Clean up and modernize ESlint configuration (#866)

This commit is contained in:
Jon Koops 2021-07-20 16:50:37 +02:00 committed by GitHub
parent 1d79a5d9a8
commit a0cd879857
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 199 additions and 280 deletions

23
.eslintrc.js Normal file
View file

@ -0,0 +1,23 @@
/** @type {import("eslint").Linter.Config } */
module.exports = {
root: true,
env: {
node: true,
},
extends: [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/base",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:prettier/recommended",
],
settings: {
react: {
version: "detect",
},
},
rules: {
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": ["error"],
},
};

View file

@ -1,40 +0,0 @@
{
"env": {
"node":true,
"browser": true,
"es6": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:prettier/recommended"
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2018,
"sourceType": "module"
},
"plugins": [
"react",
"@typescript-eslint"
],
"rules": {
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [
"error"
]
},
"settings": {
"react": {
"version": "detect"
}
}
}

412
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -56,8 +56,8 @@
"@types/react-dom": "^17.0.9",
"@types/react-router-dom": "^5.1.8",
"@types/snowpack-env": "^2.3.4",
"@typescript-eslint/eslint-plugin": "^4.28.1",
"@typescript-eslint/parser": "^4.28.3",
"@typescript-eslint/eslint-plugin": "^4.28.4",
"@typescript-eslint/parser": "^4.28.4",
"cypress": "7.7.0",
"decompress": "^4.2.1",
"decompress-targz": "^4.1.1",