eslint-config-heyitsbash
Version:
"ESlint & Prettier Config by heyitsbash"
133 lines (132 loc) • 3.95 kB
JavaScript
module.exports = {
"extends": [
"airbnb",
"prettier",
"prettier/react"
],
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 2018,
"ecmaFeatures": {
"impliedStrict": true,
"classes": true
}
},
"env": {
browser: true,
node: true,
es6: true,
mocha: true,
jest: true
},
"globals": {
Action: true,
NProgress: true,
StripeButton: true,
StripeCheckout: true
},
"rules": {
"camelcase": "warn",
"no-console": [ "warn", { allow: [ "error", "warn" ] } ],
"no-cond-assign": "warn",
"react/jsx-key": "warn",
"react/prop-types": "warn",
"no-continue": "off",
"no-unused-vars": "warn",
"no-confusing-arrow": "warn",
"no-else-return": [ "error", { allowElseIf: true }],
"no-unused-expressions": "warn",
"jsx-a11y/click-events-have-key-events": "off",
"no-plusplus": [ "warn", { allowForLoopAfterthoughts: true } ],
"react/display-name": ["error", { ignoreTranspilerName: true }],
"react/prefer-es6-class": "off",
"react/no-string-refs": "off",
"react/forbid-prop-types": [ "warn", { forbid: [ "any" ] }],
"class-methods-use-this": "warn",
"react/no-array-index-key": "warn",
"newline-per-chained-call": [ "error", { ignoreChainWithDepth: 3 }],
"indent": [
"error", 2, {
SwitchCase: 1,
VariableDeclarator: 1,
outerIIFEBody: 1,
MemberExpression: 1,
ArrayExpression: 1,
FunctionDeclaration: {
parameters: 1,
body: 1
},
FunctionExpression: {
parameters: 1,
body: 1
}
}],
"react/require-default-props": "off",
"react/no-unused-prop-types": "warn",
"react/destructuring-assignment": "warn",
"react/no-will-update-set-state": "off",
"import/prefer-default-export": "warn",
"import/no-named-as-default": "warn",
"default-case": "off",
"new-cap": "warn",
"eqeqeq": "warn",
"max-len": ["warn", { code: 200 }],
"prefer-const": [ "warn", { destructuring: "all" }],
"prefer-destructuring": ["warn", { object: true, array: false }],
"function-paren-newline": "off",
"consistent-return": "off",
"prefer-arrow-callback": "off",
"no-shadow": "off",
"no-restricted-syntax": "off",
"guard-for-in": "warn",
"no-param-reassign": "warn",
"no-await-in-loop": "off",
"no-alert": "off",
"import/no-named-as-default-member": "warn",
"jsx-a11y/no-static-element-interactions": "off",
"react/jsx-filename-extension": "warn",
"react/jsx-wrap-multilines": "warn",
"jsx-a11y/no-noninteractive-element-interactions": "off",
"jsx-a11y/label-has-for": "off",
"array-bracket-spacing": "off",
"arrow-body-style": [ "warn", "as-needed" ],
"space-before-function-paren": ["error", { anonymous: "never", named: "never", asyncArrow: "always" } ],
"no-use-before-define": ["error", { functions: false }],
"func-names": "off",
"padded-blocks": "off",
"curly": ["error", "multi-line"],
"object-curly-newline": "warn",
"arrow-parens": ["error", "as-needed"],
"import/no-unresolved": "off",
"import/extensions": "off",
"import/no-absolute-path": "off",
"import/no-extraneous-dependencies": "off",
"brace-style": ["error", "1tbs"],
"no-underscore-dangle": "warn",
"no-useless-escape": "warn",
"no-useless-return": "warn",
"comma-dangle": ["error", {
arrays: "always-multiline",
objects: "always-multiline",
imports: "always-multiline",
exports: "always-multiline",
functions: "never"
}],
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"prettier/prettier": [
"error",
{
"trailingComma": "es5",
"singleQuote": true,
"printWidth": 80,
"arrowParens": "avoid"
}
],
},
"plugins": [
"html",
"prettier",
"react-hooks"
]
};