Add Typescript linting with ESLint

This commit is contained in:
Andreas Nedbal 2020-12-26 18:38:18 +01:00 committed by Andreas Nedbal
parent 9fceedc5b4
commit d9d10d534f
4 changed files with 12364 additions and 19 deletions

26
.eslintrc.json Normal file
View File

@ -0,0 +1,26 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"env": {
"browser": true,
"es6": true
},
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"rules": {
}
}

11609
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,8 @@
{
"scripts": {
"lint": "yarn run eslint --ext .ts app/javascript",
"lint:fix": "yarn run eslint --ext .ts app/javascript --fix"
},
"dependencies": {
"@babel/preset-typescript": "^7.12.7",
"@rails/ujs": "^6.1.0",
@ -27,8 +31,12 @@
"@babel/core": "^7.12.10",
"@babel/preset-env": "^7.12.11",
"@rails/webpacker": "5.2.1",
"@typescript-eslint/eslint-plugin": "^4.11.0",
"@typescript-eslint/parser": "^4.11.0",
"coffee-loader": "1.0.1",
"coffeescript": "^2.5.1",
"eslint": "^7.16.0",
"eslint-plugin-import": "^2.22.1",
"webpack": "^4",
"webpack-dev-server": "^3.11.0"
}

740
yarn.lock

File diff suppressed because it is too large Load Diff