123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168 |
- {
- "parser": "@babel/eslint-parser",
- "plugins": ["babel", "vue", "import", "node", "promise"],
- "env": {
- "browser": true,
- "node": true,
- "es6": true,
- "jest": true
- },
- "extends": [
- "plugin:vue/vue3-essential",
- "eslint:recommended"
- ],
- "parserOptions": {
- "ecmaVersion": "latest"
- },
- "rules": {
- "radix": "off",
- "array-callback-return": "error",
- "object-curly-spacing": ["error", "always"],
- "curly": ["error", "all"],
- "brace-style": ["error", "1tbs"],
- "space-before-blocks": "error",
- "space-before-function-paren": ["error", {
- "anonymous": "never",
- "named": "never",
- "asyncArrow": "always"
- }],
- "keyword-spacing": ["error", { "before": true, "after": true }],
- "no-undef": "error",
- "no-trailing-spaces": "error",
- "semi": "error",
- "arrow-parens": ["error", "always"],
- "camelcase": "error",
- "arrow-body-style": "off",
- "array-bracket-spacing": "error",
- "quotes": ["error", "single", { "avoidEscape": true }],
- "prefer-template": "error",
- "no-tabs": "error",
- "import/no-duplicates": "error",
- "no-unused-vars": "error",
- "no-unused-expressions": "off",
- "no-useless-rename": "off",
- "no-await-in-loop": "off",
- "no-lonely-if": "off",
- "guard-for-in": "off",
- "function-paren-newline": "off",
- "indent": ["error", 2, { "SwitchCase": 1 }],
- "no-case-declarations": "off",
- "no-restricted-syntax": "off",
- "no-new": "off",
- "symbol-description": "off",
- "comma-dangle": "off",
- "no-empty": [2, { "allowEmptyCatch": true }],
- "lines-between-class-members": "off",
- "no-fallthrough": "off",
- "func-names": "off",
- "operator-linebreak": "off",
- "no-var": 2,
- "quote-props": "off",
- "prefer-arrow-callback": "off", // would like to remove this rule https://eslint.org/docs/rules/prefer-arrow-callback#require-using-arrow-functions-for-callbacks-prefer-arrow-callback
- "dot-notation": "off",
- "class-methods-use-this": "off",
- "object-curly-newline": "off",
- "vars-on-top": "off",
- "prefer-destructuring": "off",
- "eol-last": "off",
- "max-len": "off",
- "prefer-rest-params": "off", // would like to remove this rule https://eslint.org/docs/rules/prefer-rest-params#suggest-using-the-rest-parameters-instead-of-arguments-prefer-rest-params
- "no-underscore-dangle": "off",
- "object-shorthand": "off", // would like to remove this rule https://eslint.org/docs/rules/object-shorthand#require-object-literal-shorthand-syntax-object-shorthand
- "no-console": ["error", { "allow": ["warn", "error"] }],
- "no-param-reassign": "off",
- "no-plusplus": "off",
- "consistent-return": "off",
- "new-cap": "off",
- "linebreak-style": "off",
- "no-throw-literal": "off",
- "no-script-url": "off",
- "no-restricted-globals": "off", // would like to remove this rule https://eslint.org/docs/rules/no-restricted-globals#disallow-specific-global-variables-no-restricted-globals
- "no-multi-assign": "off", // would like to remove this rule https://eslint.org/docs/rules/no-multi-assign#disallow-use-of-chained-assignment-expressions-no-multi-assign
- "no-bitwise": "off",
- "no-prototype-builtins": "off",
- "no-nested-ternary": "off",
- "prefer-promise-reject-errors": "off",
- "prefer-spread": "off", // would like to remove this rule https://eslint.org/docs/rules/prefer-spread#suggest-using-spread-syntax-instead-of-apply-prefer-spread
- "no-mixed-operators": "off",
- "no-cond-assign": "off",
- "no-extend-native": "off", // would be nice to remove, not critical https://eslint.org/docs/rules/no-extend-native#disallow-extending-of-native-objects-no-extend-native
- "no-restricted-properties": "off",
- "no-proto": "off", // would like to remove this rule https://eslint.org/docs/rules/no-proto#disallow-use-of-__proto__-no-proto
- "no-continue": "off",
- "default-case": "off",
- "no-shadow": "off", // would like to eventually remove this but its super hard right now https://eslint.org/docs/rules/no-shadow#disallow-variable-declarations-from-shadowing-variables-declared-in-the-outer-scope-no-shadow
- "no-useless-escape": "off",
- "wrap-iife": "off",
- "import/no-cycle": "off",
- "import/order": "off",
- "import/named": "off",
- "import/no-named-as-default": "off",
- "import/prefer-default-export": "off",
- "import/no-extraneous-dependencies": "off",
- "import/no-unresolved": "off",
- "import/no-webpack-loader-syntax": "off",
- "import/extensions": [
- "error",
- "ignorePackages",
- {
- "js": "never",
- "ts": "never"
- }
- ],
- "@typescript-eslint/no-useless-constructor": "off",
- "@typescript-eslint/explicit-function-return-type": "off",
- "@typescript-eslint/no-this-alias": "off",
- "@typescript-eslint/no-empty-function": "off",
- "@typescript-eslint/camelcase": "off",
- "@typescript-eslint/ban-ts-ignore": "off",
- "@typescript-eslint/no-explicit-any": "off",
- "@typescript-eslint/no-empty-interface": "off",
- "@typescript-eslint/no-use-before-define": "off",
- "@typescript-eslint/class-name-casing": "off",
- "@typescript-eslint/no-unused-vars": "off",
- "@pdftron/webviewer/no-string-events": "off",
- "react/prop-types": "off"
- },
- "overrides": [
- {
- "files": "**/*.ts",
- "rules": {
- "no-useless-constructor": "off"
- }
- },
- {
- "files": "**/*.stories.js",
- "rules": {
- "no-console": "off",
- "react/prop-types": "off",
- "no-alert": "off",
- "no-unused-vars": "off",
- "@typescript-eslint/no-useless-constructor": "off",
- "no-useless-constructor": "off"
- }
- },
- {
- "files": "**/*.spec.js",
- "rules": {
- "no-console": "off",
- "no-undef": "off",
- "no-unused-vars": "off",
- "no-alert": "off",
- "@typescript-eslint/no-useless-constructor": "off",
- "no-useless-constructor": "off"
- }
- },
- {
- "files": "**/*.test.js",
- "rules": {
- "no-console": "off",
- "no-undef": "off",
- "no-unused-vars": "off",
- "no-alert": "off",
- "@typescript-eslint/no-useless-constructor": "off",
- "no-useless-constructor": "off"
- }
- }
- ]
- }
|