2019-08-21 17:04:26 +02:00
|
|
|
const path = require("path");
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
"env": {
|
|
|
|
"browser": true,
|
|
|
|
"node": true,
|
|
|
|
"es6": true,
|
|
|
|
"jest": true
|
|
|
|
},
|
|
|
|
"extends": [
|
|
|
|
"airbnb",
|
|
|
|
"airbnb/hooks"
|
|
|
|
],
|
|
|
|
"globals": {
|
|
|
|
"_": "readonly",
|
|
|
|
"babel": "readonly",
|
|
|
|
"ForisTranslations": "readonly",
|
|
|
|
"ngettext": "readonly",
|
|
|
|
"ForisPlugins": "readonly"
|
|
|
|
},
|
|
|
|
"parser": "babel-eslint",
|
|
|
|
"rules": {
|
|
|
|
"quotes": ["error", "double"],
|
|
|
|
"indent": ["error", 4],
|
|
|
|
"react/jsx-indent": ["error", 4],
|
|
|
|
"react/jsx-indent-props": ["error", 4],
|
|
|
|
"react/prop-types": "warn",
|
|
|
|
"react/no-array-index-key": "warn",
|
|
|
|
"react/button-has-type": "warn",
|
2019-08-27 17:46:45 +02:00
|
|
|
"import/prefer-default-export": "off",
|
2019-08-21 17:04:26 +02:00
|
|
|
"import/no-unresolved": [
|
|
|
|
"error",
|
|
|
|
// Ignore imports used only in tests
|
2019-08-29 11:46:13 +02:00
|
|
|
{ ignore: ["customTestRender"] }
|
2019-08-21 17:04:26 +02:00
|
|
|
],
|
|
|
|
"import/no-cycle": "warn",
|
|
|
|
"no-console": "error",
|
2019-08-27 17:46:45 +02:00
|
|
|
"no-use-before-define": ["error", {
|
|
|
|
functions: false,
|
|
|
|
classes: true,
|
|
|
|
variables: true
|
|
|
|
}],
|
2019-08-21 17:04:26 +02:00
|
|
|
"no-restricted-syntax": "warn",
|
|
|
|
// Should be enabled in the future
|
|
|
|
"camelcase": "off",
|
|
|
|
"no-param-reassign": "off",
|
|
|
|
"react/jsx-props-no-spreading": "off",
|
|
|
|
"react/require-default-props": "off",
|
|
|
|
"react/default-props-match-prop-types": "off",
|
|
|
|
"react/forbid-prop-types": "off",
|
|
|
|
// Permanently disabled
|
|
|
|
"react/jsx-filename-extension": "off",
|
|
|
|
"no-plusplus": "off",
|
|
|
|
"consistent-return": "off",
|
|
|
|
"radix": "off",
|
|
|
|
"no-continue": "off",
|
|
|
|
"react/no-danger": "off",
|
|
|
|
},
|
|
|
|
"settings": {
|
|
|
|
"import/resolver": {
|
2019-08-27 16:09:18 +02:00
|
|
|
"node": {
|
|
|
|
"paths": ["src"]
|
2019-08-21 17:04:26 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-08-23 15:20:22 +02:00
|
|
|
};
|