1
0
mirror of https://github.com/kremalicious/ipfs.git synced 2024-11-24 19:00:55 +01:00

simplify ESLint setup

This commit is contained in:
Matthias Kretschmann 2021-09-13 22:29:05 +02:00
parent fd24a7bc57
commit 459044b620
Signed by: m
GPG Key ID: 606EEEF3C479A91F
5 changed files with 1193 additions and 252 deletions

View File

@ -1,43 +0,0 @@
{
"extends": ["eslint:recommended", "prettier"],
"parserOptions": {
"sourceType": "module",
"ecmaFeatures": { "jsx": true }
},
"env": {
"browser": true,
"node": true,
"es2020": true,
"jest": true
},
"settings": { "react": { "version": "detect" } },
"overrides": [
{
"files": ["**/*.ts", "**/*.tsx"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
},
"project": "./tsconfig.json",
"tsconfigRootDir": "./"
},
"extends": [
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:jsx-a11y/recommended",
"plugin:prettier/recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:@next/next/recommended"
],
"plugins": ["@typescript-eslint", "react"],
"rules": {
"react/prop-types": "off",
"@typescript-eslint/explicit-function-return-type": "off"
}
}
]
}

3
.eslintrc.json Normal file
View File

@ -0,0 +1,3 @@
{
"extends": ["prettier", "plugin:prettier/recommended", "next/core-web-vitals"]
}

View File

@ -9,7 +9,7 @@
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
name: 'CodeQL'
on:
push:

1332
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -8,7 +8,7 @@
"serve": "next start",
"test": "npm run lint && npm run type-check && NODE_ENV=test jest -c jest/jest.config.js",
"test:watch": "npm run lint && npm run type-check && NODE_ENV=test jest -c jest/jest.config.js --watch",
"lint": "eslint --ignore-path .gitignore --ext .js --ext .tsx --ext .ts .",
"lint": "next lint",
"type-check": "tsc --noEmit",
"format": "prettier --ignore-path .gitignore '**/*.{css,yml,js,jsx,ts,tsx,json}' --write",
"analyze": "ANALYZE=true next build"
@ -29,20 +29,15 @@
"devDependencies": {
"@babel/preset-typescript": "^7.15.0",
"@next/bundle-analyzer": "^11.1.2",
"@next/eslint-plugin-next": "^11.1.2",
"@testing-library/jest-dom": "^5.14.1",
"@testing-library/react": "^12.1.0",
"@types/jest": "^27.0.1",
"@types/node": "^16.9.1",
"@types/react": "^17.0.2",
"@typescript-eslint/eslint-plugin": "^4.31.0",
"@typescript-eslint/parser": "^4.31.0",
"eslint": "^7.32.0",
"eslint-config-next": "11.1.2",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react": "^7.25.1",
"eslint-plugin-react-hooks": "^4.2.0",
"jest": "^27.1.1",
"prettier": "^2.4.0",
"typescript": "^4.4.3"