aboutsummaryrefslogtreecommitdiff
path: root/vnext/.eslintrc
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2022-10-28 15:15:03 +0300
committerGravatar Vitaly Takmazov2023-01-13 10:37:58 +0300
commit204f3762eedd8028f7d79826dc625eb31bbcb909 (patch)
tree683fbb0bdc3754f02fd8014cf52d4e26cb8ae1ad /vnext/.eslintrc
parent6e2f663ef80a784dd9b51fae76b17c042bbb46ee (diff)
Merge `eslint` configuration from Next version
Diffstat (limited to 'vnext/.eslintrc')
-rw-r--r--vnext/.eslintrc76
1 files changed, 27 insertions, 49 deletions
diff --git a/vnext/.eslintrc b/vnext/.eslintrc
index 34c2965d..639eb60a 100644
--- a/vnext/.eslintrc
+++ b/vnext/.eslintrc
@@ -1,15 +1,12 @@
{
"extends": [
"eslint:recommended",
+ "plugin:jsdoc/recommended",
"plugin:react/recommended",
+ "plugin:react/jsx-runtime",
"plugin:jest/recommended"
],
"parser": "@babel/eslint-parser",
- "parserOptions": {
- "sourceType": "module",
- "allowImportExportEverywhere": false,
- "codeFrame": false
- },
"env": {
"browser": true,
"node": true,
@@ -17,62 +14,43 @@
"jest/globals": true
},
"plugins": [
- "babel",
+ "@babel",
"react",
- "jest",
+ "react-hooks",
"only-ascii",
- "react-hooks"
+ "testing-library",
+ "jest",
+ "jest-dom",
+ "jsdoc",
+ "no-floating-promise"
],
"settings": {
"react": {
"pragma": "React",
"version": "18"
+ },
+ "jsdoc": {
+ "mode": "typescript"
}
},
+ "overrides": [
+ {
+ "files": ["**/__tests__/**/*.[jt]s?(x)", "**/?(*.)+(spec|test).[jt]s?(x)"],
+ "extends": ["plugin:testing-library/react"]
+ }
+ ],
"rules": {
- "strict": 0,
- "no-console": "off",
- "no-underscore-dangle": "warn",
"quotes": ["error", "single"],
-
- "no-const-assign": "warn",
- "no-this-before-super": "warn",
- "no-unreachable": "warn",
- "no-undef": "warn",
- "constructor-super": "warn",
- "valid-typeof": "warn",
- "no-eq-null": "warn",
- "no-shadow-restricted-names": "warn",
- "no-trailing-spaces": "warn",
- "semi": "warn",
- "keyword-spacing": "warn",
- "block-spacing": "warn",
- "arrow-spacing": "warn",
- "semi-spacing": "warn",
- "brace-style": ["warn", "1tbs", { "allowSingleLine": true }],
- "dot-location": ["warn", "property"],
- "no-tabs": "warn",
- "eol-last": "warn",
- "comma-style": "warn",
- "curly": "warn",
- "no-shadow": "off",
- "no-cond-assign": "off",
- "no-sparse-arrays": "off",
- "no-unused-vars": "off",
- "no-useless-escape": "off",
-
"only-ascii/only-ascii": ["warn", { "allowedChars": "✓←→♡ ·—©" }],
-
- "jest/no-disabled-tests": "warn",
- "jest/no-focused-tests": "error",
- "jest/no-identical-title": "error",
- "jest/prefer-to-have-length": "warn",
- "jest/valid-expect": "error",
-
"react/prop-types": "off",
- "react/jsx-uses-react": "off",
- "react/react-in-jsx-scope": "off",
- "react-hooks/rules-of-hooks": "error",
- "react-hooks/exhaustive-deps": "warn"
+ "testing-library/no-node-access": "off",
+ "jsdoc/require-jsdoc": ["error", { "publicOnly" : true }],
+ "jsdoc/require-returns": "off",
+ "jsdoc/require-returns-type": "off",
+ "jsdoc/require-property-description": "off",
+ "jsdoc/require-param-description": "off",
+ "no-floating-promise/no-floating-promise": "error",
+ "semi": ["error", "always"],
+ "semi-style": ["error", "last"]
}
}