|
| 1 | +module.exports = { |
| 2 | + env: { |
| 3 | + browser: true, |
| 4 | + es2021: true |
| 5 | + }, |
| 6 | + extends: [ |
| 7 | + 'eslint:recommended', |
| 8 | + 'standard-with-typescript', |
| 9 | + 'plugin:react/recommended', |
| 10 | + 'plugin:cypress/recommended', |
| 11 | + 'plugin:prettier/recommended', |
| 12 | + ], |
| 13 | + parser: "@babel/eslint-parser", |
| 14 | + parserOptions: { |
| 15 | + ecmaFeatures: { |
| 16 | + jsx: true |
| 17 | + }, |
| 18 | + ecmaVersion: 'latest', |
| 19 | + sourceType: 'module', |
| 20 | + }, |
| 21 | + plugins: ['react', 'cypress'], |
| 22 | + rules: { |
| 23 | + "@next/next/no-html-link-for-pages": "off", |
| 24 | + "@next/next/no-img-element": "off", |
| 25 | + "react-hooks/rules-of-hooks": "warn", |
| 26 | + "react-hooks/exhaustive-deps": "off", |
| 27 | + "jsx-a11y/alt-text": "off", |
| 28 | + "valid-typeof": "warn", |
| 29 | + "array-bracket-spacing": ["error", "never"], |
| 30 | + "comma-style": ["error"], |
| 31 | + "jsx-quotes": ["error", "prefer-double"], |
| 32 | + "block-scoped-var": "error", |
| 33 | + "keyword-spacing": "error", |
| 34 | + "no-trailing-spaces": "error", |
| 35 | + "object-curly-spacing": ["error", "always"], |
| 36 | + "arrow-spacing": ["error", { |
| 37 | + "before": true, |
| 38 | + "after": true |
| 39 | + }], |
| 40 | + "key-spacing": ["error", { |
| 41 | + "beforeColon": true, |
| 42 | + "afterColon": true |
| 43 | + }], |
| 44 | + "block-spacing": "error", |
| 45 | + "brace-style": ["error", "1tbs"], |
| 46 | + "indent": ["error", 2, { |
| 47 | + "FunctionExpression": { |
| 48 | + "parameters": "first" |
| 49 | + }, |
| 50 | + "FunctionDeclaration": { |
| 51 | + "parameters": "first" |
| 52 | + }, |
| 53 | + "MemberExpression": 1, |
| 54 | + "SwitchCase": 1, |
| 55 | + "outerIIFEBody": 0, |
| 56 | + "VariableDeclarator": { |
| 57 | + "var": 2, |
| 58 | + "let": 2, |
| 59 | + "const": 3 |
| 60 | + }, |
| 61 | + ignoredNodes: ["TemplateLiteral"] |
| 62 | + }], |
| 63 | + "react/react-in-jsx-scope": "off", |
| 64 | + "no-undef": "error", |
| 65 | + "react/jsx-uses-vars": [2], |
| 66 | + "react/jsx-no-undef": "error", |
| 67 | + "no-console": 0, |
| 68 | + "no-unused-vars": "error", |
| 69 | + "react/jsx-key": "warn", |
| 70 | + "no-dupe-keys": "error", |
| 71 | + "react/jsx-filename-extension": [1, { |
| 72 | + "extensions": [".js", ".jsx"] |
| 73 | + }], |
| 74 | + "react/prop-types": "off" |
| 75 | + } |
| 76 | +}; |
0 commit comments