-
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.
Added linting (eslint and stylelint)
- Loading branch information
1 parent
845e6b4
commit 3ceecaf
Showing
14 changed files
with
3,359 additions
and
343 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,4 @@ | ||
/node_modules/ | ||
/build/ | ||
/.svelte-kit/ | ||
/vite.config.ts.timestamp-*.mjs |
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,51 @@ | ||
module.exports = { | ||
extends: [ | ||
"eslint:recommended", | ||
"prettier", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:svelte/prettier", | ||
], | ||
|
||
parser: "@typescript-eslint/parser", | ||
parserOptions: { | ||
project: "tsconfig.json", | ||
extraFileExtensions: [".svelte"], | ||
}, | ||
overrides: [ | ||
{ | ||
files: ["*.svelte"], | ||
plugins: ["svelte"], | ||
parser: "svelte-eslint-parser", | ||
parserOptions: { | ||
parser: { | ||
ts: "@typescript-eslint/parser", | ||
js: "espree", | ||
}, | ||
}, | ||
}, | ||
{ | ||
files: ["*.js"], | ||
parser: "espree", | ||
} | ||
], | ||
|
||
env: { | ||
browser: true, | ||
node: true, | ||
es2020: true, | ||
}, | ||
|
||
settings: { | ||
svelte: { | ||
kit: { | ||
paths: { | ||
base: process.env.BASE_PATH, | ||
}, | ||
}, | ||
}, | ||
}, | ||
|
||
globals: { | ||
NodeJS: 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,21 @@ | ||
name: Linting | ||
|
||
on: | ||
push: | ||
branches: "master" | ||
pull_request: | ||
|
||
jobs: | ||
linting: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
cache: npm | ||
- run: npm ci | ||
- name: eslint | ||
run: npm run eslint | ||
- name: stylelint | ||
run: npm run stylelint |
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 |
---|---|---|
@@ -1,5 +1,4 @@ | ||
/node_modules/ | ||
/build/ | ||
/.svelte-kit/ | ||
/package/ | ||
/vite.config.ts.timestamp-*.mjs |
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 |
---|---|---|
@@ -1,5 +1,4 @@ | ||
/node_modules/ | ||
/build/ | ||
/.svelte-kit/ | ||
/package/ | ||
/vite.config.ts.timestamp-*.mjs |
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 @@ | ||
/node_modules/ | ||
/build/ | ||
/.svelte-kit/ |
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 @@ | ||
extends: | ||
- stylelint-config-standard-scss | ||
- stylelint-config-prettier-scss | ||
- stylelint-config-html/html | ||
- stylelint-config-html/svelte | ||
plugins: | ||
stylelint-use-nesting | ||
rules: | ||
custom-property-empty-line-before: never | ||
selector-pseudo-class-no-unknown: | ||
- true | ||
- ignorePseudoClasses: | ||
- global | ||
csstools/use-nesting: always |
Oops, something went wrong.