oneuptime/.eslintrc.json

186 lines
5.6 KiB
JSON
Raw Normal View History

2020-02-27 10:02:58 +00:00
{
"parserOptions": {
"ecmaVersion": 8,
"ecmaFeatures": {
"experimentalObjectRestSpread": true,
"jsx": true,
"spread": true
},
2022-04-17 13:57:56 +00:00
"sourceType": "module",
2022-04-22 12:05:34 +00:00
"project": [
"./tsconfig.json"
]
2020-02-27 10:02:58 +00:00
},
"env": {
"browser": true,
"node": true,
"jquery": true,
"es6": true,
2022-05-05 20:40:56 +00:00
"jest": true,
"jasmine": true
2020-02-27 10:02:58 +00:00
},
2021-07-08 19:33:17 +00:00
"plugins": [
"react",
2022-02-07 18:19:50 +00:00
"jsx-a11y",
2022-03-19 17:01:37 +00:00
"progress",
2022-04-12 20:33:28 +00:00
"@typescript-eslint",
"unused-imports"
2021-07-08 19:33:17 +00:00
],
2020-02-27 10:02:58 +00:00
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:prettier/recommended",
2022-03-19 17:00:54 +00:00
"prettier"
2020-02-27 10:02:58 +00:00
],
2021-07-08 19:33:17 +00:00
"globals": {
2022-04-22 12:05:34 +00:00
"describe": true,
"context": true,
"before": true,
"beforeEach": true,
"after": true,
"afterEach": true,
"it": true,
"expect": true,
"workbox": true,
"importScripts": true,
2022-02-27 12:24:02 +00:00
"$TSFixMe": true
2021-07-08 19:33:17 +00:00
},
2022-02-25 18:41:49 +00:00
"parser": "@typescript-eslint/parser",
2020-02-27 10:02:58 +00:00
"rules": {
"no-fallthrough": "error",
"no-unreachable": "error",
"no-cond-assign": "error",
"valid-typeof": "error",
"no-func-assign": "error",
2022-04-14 13:40:04 +00:00
"curly": "error",
2020-02-27 10:02:58 +00:00
"no-extra-semi": "error",
2022-04-15 22:14:01 +00:00
"no-else-return": "error",
"no-div-regex": "error",
2022-04-16 11:23:47 +00:00
"no-octal": "error",
2022-04-15 22:14:01 +00:00
"no-extra-bind": "error",
2022-04-16 11:23:47 +00:00
"unicode-bom": "error",
2022-04-15 22:16:15 +00:00
"no-extra-boolean-cast": "error",
2022-04-16 11:23:47 +00:00
"wrap-regex": "error",
"wrap-iife": "error",
"yield-star-spacing": "error",
2022-04-15 22:16:15 +00:00
"no-implicit-coercion": "error",
"no-extra-label": "error",
2022-04-15 22:14:01 +00:00
"multiline-comment-style": "error",
2022-04-15 22:17:21 +00:00
"no-lonely-if": "error",
2022-04-15 22:16:15 +00:00
"no-floating-decimal": "error",
2022-04-15 22:14:01 +00:00
"eqeqeq": "error",
2022-04-17 13:52:16 +00:00
"dot-notation": "off", // Off because it messes up with typescript compiler.
2022-04-20 21:21:23 +00:00
"@typescript-eslint/dot-notation": "off", //temp off.
2022-02-07 18:19:50 +00:00
"progress/activate": 1,
2021-07-08 19:33:17 +00:00
"linebreak-style": [
"error",
"unix"
],
2022-05-17 12:31:22 +00:00
"@typescript-eslint/no-empty-interface": [
"error",
2022-05-17 12:31:22 +00:00
{
"allowSingleExtends": true
}
],
2022-04-12 20:33:28 +00:00
// https://www.npmjs.com/package/eslint-plugin-unused-imports
2022-03-19 17:01:37 +00:00
"no-unused-vars": "off",
2022-04-12 20:33:28 +00:00
"@typescript-eslint/no-unused-vars": "off",
2022-05-17 13:52:53 +00:00
"@typescript-eslint/no-extra-non-null-assertion": "error",
2022-05-17 16:45:59 +00:00
"@typescript-eslint/no-floating-promises":"error",
2022-05-16 10:45:51 +00:00
"@typescript-eslint/await-thenable":"error",
2022-04-12 20:33:28 +00:00
"unused-imports/no-unused-imports": "error",
2022-04-22 12:05:34 +00:00
"unused-imports/no-unused-vars": [
"error",
{
"vars": "all",
"varsIgnorePattern": "^_",
"args": "after-used",
"argsIgnorePattern": "^_"
}
],
"@typescript-eslint/explicit-member-accessibility": [
"error"
],
2020-02-27 10:02:58 +00:00
"no-console": "error",
"no-undef": "error",
"no-empty": "error",
2022-04-14 13:40:04 +00:00
"prefer-arrow-callback": "error",
"constructor-super": "error",
2020-02-27 10:02:58 +00:00
"no-case-declarations": "error",
"no-mixed-spaces-and-tabs": "error",
"no-useless-escape": "error",
2021-05-14 08:49:00 +00:00
"prettier/prettier": "error",
2020-02-27 10:02:58 +00:00
"react/jsx-no-undef": "error",
"react/jsx-no-bind": [
"error",
{
"allowArrowFunctions": true,
"allowBind": false,
"ignoreRefs": false
}
],
"react/no-children-prop": "error",
"react/no-deprecated": "error",
"react/boolean-prop-naming": "error",
"react/no-is-mounted": "error",
"react/no-find-dom-node": "error",
2022-04-14 20:49:36 +00:00
"one-var-declaration-per-line": "error",
2022-04-15 11:33:52 +00:00
"arrow-parens": "error",
2022-04-22 12:05:34 +00:00
"arrow-body-style": [
"error",
"always"
],
2022-04-14 13:40:04 +00:00
"@typescript-eslint/typedef": [
"error",
{
2022-04-22 12:05:34 +00:00
"arrowParameter": true,
"variableDeclaration": true
2022-04-14 13:40:04 +00:00
}
2022-04-22 12:05:34 +00:00
],
"@typescript-eslint/strict-boolean-expressions": "off", //Need to enable this very soon
2022-04-12 12:41:51 +00:00
"@typescript-eslint/explicit-function-return-type": [
"error",
{
2022-04-22 12:05:34 +00:00
"allowExpressions": true
2022-04-12 12:41:51 +00:00
}
2022-04-22 12:05:34 +00:00
],
2020-02-27 10:02:58 +00:00
"react/no-did-update-set-state": "error",
"react/no-unknown-property": "error",
"react/no-unused-prop-types": "error",
"react/jsx-no-duplicate-props": "error",
"react/no-unused-state": "error",
"react/jsx-uses-vars": "error",
"react/prop-types": "error",
"react/react-in-jsx-scope": "error",
"react/no-string-refs": "error",
2021-07-08 19:33:17 +00:00
"jsx-a11y/href-no-hash": [
0
],
2020-02-27 10:02:58 +00:00
"react/no-unescaped-entities": "error",
2021-05-14 08:49:00 +00:00
"react/display-name": "error",
2020-02-27 10:02:58 +00:00
"react/jsx-pascal-case": "error",
"array-callback-return": "error",
"no-loop-func": "error",
2022-04-20 15:43:19 +00:00
"no-duplicate-imports": "error", /// Enable this and fix errors.
2022-04-15 22:14:01 +00:00
"no-promise-executor-return": "error",
2022-04-17 12:58:47 +00:00
"capitalized-comments": "off", // turn this on after ts-migration.
2022-04-14 13:40:04 +00:00
"for-direction": "error",
"getter-return": "error",
2020-02-27 10:02:58 +00:00
"jsx-a11y/anchor-is-valid": "error",
2022-04-14 13:40:04 +00:00
"no-async-promise-executor": "error",
2020-02-27 10:02:58 +00:00
"prefer-const": [
"error",
{
"destructuring": "any",
"ignoreReadBeforeAssign": false
}
],
"no-var": "error"
},
"settings": {
"react": {
"version": "16.5"
}
}
2022-05-16 17:38:12 +00:00
}