diff options
Diffstat (limited to '.eslintrc')
-rw-r--r-- | .eslintrc | 110 |
1 files changed, 62 insertions, 48 deletions
@@ -1,62 +1,76 @@ { - // Extend existing configuration - // from ESlint and eslint-plugin-react defaults. "extends": [ "eslint:recommended", - "plugin:jsdoc/recommended" - //, "plugin:react/recommended" + "plugin:import/recommended", + "plugin:jsdoc/recommended", + "plugin:promise/recommended", + "plugin:react/recommended", + "plugin:react/jsx-runtime", + "plugin:react-hooks/recommended", + "plugin:jest/recommended", + "plugin:jest-dom/recommended", + "plugin:@typescript-eslint/eslint-recommended", + "plugin:@typescript-eslint/recommended" ], - // Enable ES6 support. If you want to use custom Babel - // features, you will need to enable a custom parser - // as described in a section below. - "parserOptions": { - "sourceType": "module" - }, "env": { "browser": true, "node": true, - "es6": true + "es6": true, + "jest/globals": true }, - // Enable custom plugin known as eslint-plugin-react "plugins": [ - // "react" + "react", + "react-hooks", "only-ascii", - "jsdoc" + "testing-library", + "jest", + "jest-dom", + "jsdoc", + "@typescript-eslint" + ], + "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"] + } ], - // http://eslint.org/docs/rules/ + "parser": "@typescript-eslint/parser", + "parserOptions": { + "project": [ + "jsconfig.json" + ], + "sourceType": "module", + "ecmaFeatures": { + "jsx": true + }, + "ecmaVersion": 12 + }, "rules": { - "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": "off", - "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"], - //"indent": ["warn", 2], - "no-tabs": "warn", - "eol-last": "warn", - "comma-style": "warn", - "curly": "warn", - //"no-var": "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": "✓" }] // "excludePaths": ["i18n.js"] - } + "no-cond-assign": "warn", + "no-unused-vars": "warn", + "no-useless-escape": "warn", + "only-ascii/only-ascii": ["warn", { "allowedChars": "✓←→♡ ·—©" }], + "react/prop-types": "off", + "testing-library/no-node-access": "off", + "jsdoc/require-jsdoc": ["warn", { "publicOnly" : true }], + "jsdoc/require-returns": "off", + "jsdoc/require-returns-type": "off", + "jsdoc/require-property-description": "off", + "jsdoc/require-param-description": "off", + "promise/always-return": "off", + "semi": ["error", "always"], + "semi-style": ["error", "last"], + "@typescript-eslint/no-floating-promises": "error" + }, + "root": true } |