Skip to content

Instantly share code, notes, and snippets.

@nabilfreeman
Created August 18, 2021 10:40
Show Gist options
  • Save nabilfreeman/b43c05c47b39f207461618faf5a46cec to your computer and use it in GitHub Desktop.
Save nabilfreeman/b43c05c47b39f207461618faf5a46cec to your computer and use it in GitHub Desktop.
LeSalon's eslint config
const IGNORE = 0;
const WARN = 1;
const ERROR = 2;
module.exports = {
root: true,
"extends": "airbnb",
"parser": "babel-eslint",
"rules": {
"import/no-named-as-default-member": IGNORE,
"import/no-named-as-default": IGNORE,
"react/jsx-filename-extension": IGNORE,
"react/no-unescaped-entities": IGNORE,
"no-tabs": IGNORE,
"camelcase": IGNORE,
"no-console": IGNORE,
"no-param-reassign": IGNORE,
"import/prefer-default-export": IGNORE,
"consistent-return": IGNORE,
"max-len": IGNORE,
"no-continue": IGNORE,
'no-case-declarations': IGNORE,
'react/forbid-prop-types': IGNORE,
"indent": [ERROR, "tab", { "SwitchCase": 1, "VariableDeclarator": 1, "ignoredNodes": ["TemplateLiteral > *"] }],
"react/prop-types": IGNORE,
"react/jsx-indent-props": [ERROR, "tab"],
"react/jsx-indent": [
ERROR,
"tab",
{
checkAttributes: true,
indentLogicalExpressions: true
}
],
"class-methods-use-this": IGNORE,
"react/jsx-one-expression-per-line": IGNORE,
"no-restricted-syntax": IGNORE,
"prefer-template": IGNORE,
"no-plusplus": IGNORE,
"default-case": IGNORE,
"no-useless-constructor": IGNORE,
"jsx-a11y/accessible-emoji": IGNORE,
"react/no-access-state-in-setstate": IGNORE,
"react/jsx-no-bind": IGNORE,
"no-use-before-define": IGNORE,
"react/no-unescaped-entities": IGNORE,
"curly": IGNORE,
"react/no-array-index-key": IGNORE,
"no-unused-expressions": [ERROR, { "allowShortCircuit": true }],
"no-unused-vars": ERROR,
"react/no-this-in-sfc": IGNORE,
"react/destructuring-assignment": IGNORE,
"prefer-destructuring": IGNORE,
"no-await-in-loop": IGNORE,
"no-nested-ternary": IGNORE,
"react/require-default-props": IGNORE,
"global-require": IGNORE,
"no-underscore-dangle": IGNORE,
"no-labels": IGNORE,
"quotes": IGNORE,
"arrow-parens": IGNORE,
"react/jsx-fragments": IGNORE,
"import/no-self-import": IGNORE,
"no-ex-assign": IGNORE,
"max-classes-per-file": IGNORE,
"no-mixed-operators": IGNORE,
"react/sort-comp": IGNORE,
"prefer-rest-params": IGNORE,
"newline-per-chained-call": IGNORE,
"no-useless-concat": IGNORE,
"no-lonely-if": IGNORE,
// needed to disable the following to stop all the files failing on line 1 character 1.
// probably something to do with eslint 5, i downgraded to it because airbnb doesn't support 6.
// NF 2020-04-08
"react/jsx-curly-newline": IGNORE,
"react/state-in-constructor": IGNORE,
"react/static-property-placement": IGNORE,
"react/jsx-props-no-spreading": IGNORE,
},
'settings': {
'import/resolver': {
'node': {
'extensions': [
'.js',
'.jsx',
'.web.js',
'.android.js',
'.ios.js',
'.native.js',
],
},
},
"import/extensions": [
'.js',
'.jsx',
'.web.js',
'.android.js',
'.ios.js',
'.native.js',
],
},
"env": {
"jest": true
},
"globals": {
"__DEV__": true,
"fetch": true,
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment