-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 0297dae
Showing
14 changed files
with
224 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* text=auto eol=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Publish | ||
|
||
permissions: | ||
contents: write # to be able to publish a GitHub release | ||
issues: write # to be able to comment on released issues | ||
pull-requests: write # to be able to comment on released pull requests | ||
id-token: write # to enable use of OIDC for npm provenance | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- alpha | ||
- beta | ||
- next | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
- run: npm install | ||
|
||
- run: npm run lint | ||
|
||
- run: npx semantic-release | ||
env: | ||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Test | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- main | ||
- alpha | ||
- beta | ||
- next | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
- run: npm install | ||
|
||
- run: npm run lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
package-lock=false | ||
save-exact=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Contributing | ||
|
||
Thank you for showing an interest in contributing to Podium ❤️ | ||
|
||
You can find [the general contribution docs here](https://github.com/podium-lib/.github/blob/main/CONTRIBUTING.md). | ||
|
||
This module is a [shared config for ESLint](https://eslint.org/docs/latest/extend/shareable-configs). We accept changes that should apply to all repositories in the [podium-lib origanisation](https://github.com/podium-lib). | ||
|
||
A change in configuration is considered a `patch` in [semantic versioning](https://semver.org/). A new export would be a `minor`. Updating the `peerDependency` to a higher version would be a `major`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# @podium/eslint-config | ||
|
||
Shared config for ESLint used in Podium projects. | ||
|
||
## Install | ||
|
||
``` | ||
npm install --save-dev eslint @podium/eslint-config | ||
``` | ||
|
||
## Usage | ||
|
||
Create and add this to `eslint.config.js`: | ||
|
||
```js | ||
import config from "@podium/eslint-config"; | ||
|
||
export default config; | ||
``` | ||
|
||
The default config should cover most needs, but you can extend or override if you need to. | ||
|
||
```js | ||
import config from "@podium/eslint-config"; | ||
|
||
export default [ | ||
...config, | ||
/* Your customisations */ | ||
{ | ||
ignores: [".docusaurus/*"], | ||
}, | ||
]; | ||
``` | ||
|
||
If you do need to change the config, consider whether that change should happen here in the shared config so it applies to all repos. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import config from "./lib/default.js"; | ||
|
||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import prettierConfig from "eslint-config-prettier"; | ||
import prettierPlugin from "eslint-plugin-prettier/recommended"; | ||
import js from "@eslint/js"; | ||
|
||
export default [ | ||
js.configs.recommended, | ||
prettierConfig, | ||
prettierPlugin, | ||
{ | ||
ignores: ["coverage/*", "dist/*", "node_modules/*", "tap-snapshots/*"], | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import globals from "globals"; | ||
import base from "./base.js"; | ||
|
||
export default [ | ||
...base, | ||
{ | ||
languageOptions: { | ||
globals: { | ||
...globals.node, | ||
...globals.browser, | ||
}, | ||
}, | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
{ | ||
"name": "@podium/eslint-config", | ||
"version": "1.0.0", | ||
"description": "Shared ESLint config for Podium modules", | ||
"type": "module", | ||
"exports": { | ||
".": { | ||
"default": "./lib/default.js" | ||
} | ||
}, | ||
"files": [ | ||
"lib" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "git+ssh://[email protected]/podium-lib/eslint-config.git" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/podium-lib/eslint-config/issues" | ||
}, | ||
"homepage": "https://github.com/podium-lib/eslint-config#readme", | ||
"scripts": { | ||
"clean": "rimraf node_modules types", | ||
"lint": "eslint .", | ||
"lint:fix": "npm run lint -- --fix" | ||
}, | ||
"keywords": [ | ||
"eslint", | ||
"eslintconfig" | ||
], | ||
"author": "", | ||
"license": "ISC", | ||
"peerDependencies": { | ||
"eslint": ">= 9" | ||
}, | ||
"dependencies": { | ||
"eslint-config-prettier": "9.1.0", | ||
"eslint-plugin-prettier": "5.2.1", | ||
"globals": "15.9.0" | ||
}, | ||
"devDependencies": { | ||
"eslint": "9.8.0", | ||
"prettier": "3.3.3", | ||
"rimraf": "6.0.1", | ||
"semantic-release": "24.0.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
export default { | ||
singleQuote: true, | ||
trailingComma: 'all', | ||
tabWidth: 4, | ||
overrides: [ | ||
{ | ||
files: ['*.json', '*.yml'], | ||
options: { | ||
tabWidth: 2, | ||
}, | ||
}, | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
export default { | ||
plugins: [ | ||
'@semantic-release/commit-analyzer', | ||
'@semantic-release/release-notes-generator', | ||
'@semantic-release/changelog', | ||
[ | ||
'@semantic-release/npm', | ||
{ | ||
tarballDir: 'release', | ||
}, | ||
], | ||
[ | ||
'@semantic-release/github', | ||
{ | ||
assets: 'release/*.tgz', | ||
}, | ||
], | ||
'@semantic-release/git', | ||
], | ||
preset: 'angular', | ||
branches: [{ name: 'main' }, { name: 'next', prerelease: true }], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"$schema": "https://docs.renovatebot.com/renovate-schema.json", | ||
"extends": ["github>podium-lib/renovate-presets:sub-level-module"] | ||
} |