Add basic ESLint configuration
This commit is contained in:
parent
7eeac66471
commit
8b88c9fba9
5 changed files with 2090 additions and 402 deletions
1
.eslintignore
Normal file
1
.eslintignore
Normal file
|
@ -0,0 +1 @@
|
||||||
|
src/test.ts
|
23
.eslintrc.cjs
Normal file
23
.eslintrc.cjs
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
/* eslint-env node */
|
||||||
|
module.exports = {
|
||||||
|
extends: [
|
||||||
|
"eslint:recommended",
|
||||||
|
"plugin:@typescript-eslint/recommended",
|
||||||
|
"plugin:svelte/recommended",
|
||||||
|
],
|
||||||
|
parser: "@typescript-eslint/parser",
|
||||||
|
parserOptions: {
|
||||||
|
extraFileExtensions: [".svelte"],
|
||||||
|
},
|
||||||
|
overrides: [
|
||||||
|
{
|
||||||
|
files: ["*.svelte"],
|
||||||
|
parser: "svelte-eslint-parser",
|
||||||
|
parserOptions: {
|
||||||
|
parser: "@typescript-eslint/parser",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
plugins: ["@typescript-eslint"],
|
||||||
|
root: true,
|
||||||
|
}
|
3
.vscode/extensions.json
vendored
3
.vscode/extensions.json
vendored
|
@ -5,6 +5,7 @@
|
||||||
"github.vscode-pull-request-github",
|
"github.vscode-pull-request-github",
|
||||||
"svelte.svelte-vscode",
|
"svelte.svelte-vscode",
|
||||||
"bradlc.vscode-tailwindcss",
|
"bradlc.vscode-tailwindcss",
|
||||||
"editorconfig.editorconfig"
|
"editorconfig.editorconfig",
|
||||||
|
"dbaeumer.vscode-eslint"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
2440
package-lock.json
generated
2440
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -39,6 +39,9 @@
|
||||||
"generate": "mkdir -p ./assets/generated; npm run generate:licenses; npm run generate:images; npm run generate:charging-stations; npm run generate:translations; npm run reset:layeroverview; npm run generate:service-worker",
|
"generate": "mkdir -p ./assets/generated; npm run generate:licenses; npm run generate:images; npm run generate:charging-stations; npm run generate:translations; npm run reset:layeroverview; npm run generate:service-worker",
|
||||||
"generate:charging-stations": "cd ./assets/layers/charging_station && vite-node csvToJson.ts && cd -",
|
"generate:charging-stations": "cd ./assets/layers/charging_station && vite-node csvToJson.ts && cd -",
|
||||||
"prepare-deploy": "npm run generate:service-worker && ./scripts/build.sh",
|
"prepare-deploy": "npm run generate:service-worker && ./scripts/build.sh",
|
||||||
|
"lint": "npm run lint:prettier && npm run lint:eslint",
|
||||||
|
"lint:eslint": "eslint ./src",
|
||||||
|
"lint:prettier": "prettier --check '**/*.ts' '**/*.svelte'",
|
||||||
"format": "prettier --write '**/*.ts' '**/*.svelte'",
|
"format": "prettier --write '**/*.ts' '**/*.svelte'",
|
||||||
"clean:tests": "find . -type f -name \"*.doctest.ts\" | xargs -r rm",
|
"clean:tests": "find . -type f -name \"*.doctest.ts\" | xargs -r rm",
|
||||||
"clean": "rm -rf .cache/ && (find *.html | grep -v \"^\\(404\\|index\\|land\\|test\\|studio\\|theme\\|style_test\\|statistics\\).html\" | xargs -r rm) && (ls | grep \"^index_[a-zA-Z_-]\\+\\.ts$\" | xargs -r rm)",
|
"clean": "rm -rf .cache/ && (find *.html | grep -v \"^\\(404\\|index\\|land\\|test\\|studio\\|theme\\|style_test\\|statistics\\).html\" | xargs -r rm) && (ls | grep \"^index_[a-zA-Z_-]\\+\\.ts$\" | xargs -r rm)",
|
||||||
|
@ -123,9 +126,13 @@
|
||||||
"@types/prompt-sync": "^4.1.0",
|
"@types/prompt-sync": "^4.1.0",
|
||||||
"@types/wikidata-sdk": "^6.1.0",
|
"@types/wikidata-sdk": "^6.1.0",
|
||||||
"@types/xml2js": "^0.4.9",
|
"@types/xml2js": "^0.4.9",
|
||||||
|
"@typescript-eslint/eslint-plugin": "^6.1.0",
|
||||||
|
"@typescript-eslint/parser": "^6.1.0",
|
||||||
"assert": "^2.0.0",
|
"assert": "^2.0.0",
|
||||||
"chai": "^4.3.6",
|
"chai": "^4.3.6",
|
||||||
"dependency-cruiser": "^10.4.0",
|
"dependency-cruiser": "^10.4.0",
|
||||||
|
"eslint": "^8.45.0",
|
||||||
|
"eslint-plugin-svelte": "^2.32.2",
|
||||||
"fs": "0.0.1-security",
|
"fs": "0.0.1-security",
|
||||||
"node-html-parser": "^6.1.5",
|
"node-html-parser": "^6.1.5",
|
||||||
"prettier": "^2.8.8",
|
"prettier": "^2.8.8",
|
||||||
|
@ -140,8 +147,6 @@
|
||||||
"ts-node": "^10.9.1",
|
"ts-node": "^10.9.1",
|
||||||
"ts2json-schema": "^1.4.0",
|
"ts2json-schema": "^1.4.0",
|
||||||
"tslib": "^2.5.0",
|
"tslib": "^2.5.0",
|
||||||
"tslint": "^6.1.3",
|
|
||||||
"tslint-no-circular-imports": "^0.7.0",
|
|
||||||
"typescript": "^4.7.4",
|
"typescript": "^4.7.4",
|
||||||
"vite": "^4.0.5"
|
"vite": "^4.0.5"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue