Skip to content

Commit

Permalink
chore: unify duplicate eslint config files
Browse files Browse the repository at this point in the history
  • Loading branch information
emccorson committed Jul 26, 2023
1 parent f706dd3 commit 52e114f
Show file tree
Hide file tree
Showing 23 changed files with 232 additions and 988 deletions.
81 changes: 1 addition & 80 deletions apps/extension/.eslintrc
Original file line number Diff line number Diff line change
@@ -1,82 +1,3 @@
{
"env": {
"browser": true,
"es2021": true
},
"extends": [
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
"prettier/prettier"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 12,
"sourceType": "module"
},
"plugins": ["react", "@typescript-eslint", "react-hooks", "import"],
"rules": {
"react/react-in-jsx-scope": "off",
"no-use-before-define": "off",
"react/jsx-filename-extension": [
"warn",
{
"extensions": [".tsx"]
}
],
"import/extensions": [
"error",
"ignorePackages",
{
"ts": "never",
"tsx": "never"
}
],
"no-shadow": "off",
"@typescript-eslint/no-shadow": ["off"],
"@typescript-eslint/explicit-function-return-type": [
"error",
{
"allowExpressions": true
}
],
"@typescript-eslint/no-unused-vars": [
"warn", // or "error"
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"caughtErrorsIgnorePattern": "^_"
}
],
"max-len": [
"warn",
{
"code": 120,
"ignoreTemplateLiterals": true,
"ignoreStrings": true,
"ignoreUrls": true,
"ignorePattern": "<path([/s/S]*?)/>"
}
],
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "off",
"import/prefer-default-export": "off",
"react/prop-types": "off"
},
"settings": {
"react": {
"version": "17.0"
},
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
},
"import/resolver": {
"typescript": {
"paths": ["./src"]
}
}
}
"extends": "@namada/eslint-config/react"
}
3 changes: 0 additions & 3 deletions apps/extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,6 @@
"@types/zxcvbn": "^4.4.1",
"copy-webpack-plugin": "^11.0.0",
"dotenv": "^16.0.3",
"eslint": "^8.23.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-prettier": "^8.5.0",
"eslint-import-resolver-typescript": "^3.5.0",
"fake-indexeddb": "^4.0.1",
"file-loader": "^6.2.0",
Expand Down
81 changes: 1 addition & 80 deletions apps/namada-interface/.eslintrc
Original file line number Diff line number Diff line change
@@ -1,82 +1,3 @@
{
"env": {
"browser": true,
"es2021": true
},
"extends": [
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
"prettier/prettier"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 12,
"sourceType": "module"
},
"plugins": ["react", "@typescript-eslint", "react-hooks", "import"],
"rules": {
"react/react-in-jsx-scope": "off",
"no-use-before-define": "off",
"react/jsx-filename-extension": [
"warn",
{
"extensions": [".tsx"]
}
],
"import/extensions": [
"error",
"ignorePackages",
{
"ts": "never",
"tsx": "never"
}
],
"no-shadow": "off",
"@typescript-eslint/no-shadow": ["off"],
"@typescript-eslint/explicit-function-return-type": [
"error",
{
"allowExpressions": true
}
],
"@typescript-eslint/no-unused-vars": [
"warn", // or "error"
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"caughtErrorsIgnorePattern": "^_"
}
],
"max-len": [
"warn",
{
"code": 120,
"ignoreTemplateLiterals": true,
"ignoreStrings": true,
"ignoreUrls": true,
"ignorePattern": "<path([/s/S]*?)/>"
}
],
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "off",
"import/prefer-default-export": "off",
"react/prop-types": "off"
},
"settings": {
"react": {
"version": "17.0"
},
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
},
"import/resolver": {
"typescript": {
"paths": ["./src"]
}
}
}
"extends": "@namada/eslint-config/react"
}
7 changes: 0 additions & 7 deletions apps/namada-interface/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,7 @@
"babel-plugin-styled-components": "^2.0.3",
"css-loader": "^6.7.3",
"dotenv": "^16.0.3",
"eslint": "^8.9.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-prettier": "^8.4.0",
"eslint-import-resolver-typescript": "^2.5.0",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-react": "^7.28.0",
"eslint-plugin-react-hooks": "^4.3.0",
"history": "^5.3.0",
"html-webpack-plugin": "^5.5.0",
"jest": "^29.4.1",
Expand Down
44 changes: 1 addition & 43 deletions packages/chains/.eslintrc
Original file line number Diff line number Diff line change
@@ -1,45 +1,3 @@
{
"env": {
"es2021": true
},
"extends": [
"plugin:@typescript-eslint/recommended",
"prettier",
"prettier/prettier"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 12,
"sourceType": "module"
},
"plugins": ["@typescript-eslint", "import"],
"rules": {
"no-use-before-define": "off",
"import/extensions": [
"error",
"ignorePackages",
{
"ts": "never"
}
],
"no-shadow": "off",
"@typescript-eslint/no-shadow": ["off"],
"@typescript-eslint/explicit-function-return-type": [
"error",
{
"allowExpressions": true
}
],
"import/prefer-default-export": "off"
},
"settings": {
"import/parsers": {
"@typescript-eslint/parser": [".ts"]
},
"import/resolver": {
"typescript": {
"paths": ["./src"]
}
}
}
"extends": "@namada/eslint-config"
}
6 changes: 1 addition & 5 deletions packages/chains/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@
"@namada/types": "0.1.0"
},
"devDependencies": {
"eslint": "^8.27.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-prettier": "^8.5.0",
"eslint-import-resolver-typescript": "^3.5.2",
"eslint-plugin-import": "^2.26.0"
"eslint-import-resolver-typescript": "^3.5.2"
}
}
81 changes: 1 addition & 80 deletions packages/components/.eslintrc
Original file line number Diff line number Diff line change
@@ -1,82 +1,3 @@
{
"env": {
"browser": true,
"es2021": true
},
"extends": [
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
"prettier/prettier"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 12,
"sourceType": "module"
},
"plugins": ["react", "@typescript-eslint", "react-hooks", "import"],
"rules": {
"react/react-in-jsx-scope": "off",
"no-use-before-define": "off",
"react/jsx-filename-extension": [
"warn",
{
"extensions": [".tsx"]
}
],
"import/extensions": [
"error",
"ignorePackages",
{
"ts": "never",
"tsx": "never"
}
],
"no-shadow": "off",
"@typescript-eslint/no-shadow": ["off"],
"@typescript-eslint/explicit-function-return-type": [
"error",
{
"allowExpressions": true
}
],
"@typescript-eslint/no-unused-vars": [
"warn", // or "error"
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"caughtErrorsIgnorePattern": "^_"
}
],
"max-len": [
"warn",
{
"code": 120,
"ignoreTemplateLiterals": true,
"ignoreStrings": true,
"ignoreUrls": true,
"ignorePattern": "<path([/s/S]*?)/>"
}
],
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "off",
"import/prefer-default-export": "off",
"react/prop-types": "off"
},
"settings": {
"react": {
"version": "17.0"
},
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
},
"import/resolver": {
"typescript": {
"paths": ["./src"]
}
}
}
"extends": "@namada/eslint-config/react"
}
5 changes: 1 addition & 4 deletions packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@
},
"devDependencies": {
"@types/react": "^17.0.39",
"@types/styled-components": "^5.1.26",
"eslint": "^8.23.1",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-prettier": "^8.5.0"
"@types/styled-components": "^5.1.26"
}
}
45 changes: 45 additions & 0 deletions packages/eslint-config/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
module.exports = {
"env": {
"es2021": true
},
"extends": [
"plugin:@typescript-eslint/recommended",
"prettier",
"prettier/prettier"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 12,
"sourceType": "module"
},
"plugins": ["@typescript-eslint", "import"],
"rules": {
"no-use-before-define": "off",
"import/extensions": [
"error",
"ignorePackages",
{
"ts": "never"
}
],
"no-shadow": "off",
"@typescript-eslint/no-shadow": ["off"],
"@typescript-eslint/explicit-function-return-type": [
"error",
{
"allowExpressions": true
}
],
"import/prefer-default-export": "off"
},
"settings": {
"import/parsers": {
"@typescript-eslint/parser": [".ts"]
},
"import/resolver": {
"typescript": {
"paths": ["./src"]
}
}
}
};
Loading

0 comments on commit 52e114f

Please sign in to comment.