catalyst-frontend
Version:
A configurable frontend build pipeline that caters for everything from simple SASS compilation only, right through to ES2015 plus React.
84 lines (82 loc) • 2.42 kB
JSON
{
"env": {
"browser": true,
"es6": true<% if (options.jest) { %>,
"jest": true<% } %>
},
"settings": {
"import/resolver": {
"node": {
"paths": ["src"]
}
}
},
"extends": [
"airbnb",
"airbnb/hooks",
<% if (options.typescript) { %>
"plugin:@typescript-eslint/recommended",
<% } %>
"prettier",
"prettier/react",
<% if (options.typescript) { %>
"prettier/@typescript-eslint"
<% } %>
],
"plugins": ["react", "import", "prettier", "@typescript-eslint"],
"parserOptions": {
"ecmaVersion": 2020,<% if (options.react) { %>
"ecmaFeatures": {
"jsx": true
},<% } %>
"sourceType": "module"
},
"globals": {
"fetch": true,
"module": true,
"process": true
},
"rules": {
"comma-dangle": ["warn", {
"arrays": "only-multiline",
"objects": "only-multiline",
"imports": "only-multiline",
"exports": "only-multiline",
"functions": "ignore"
}],
"import/no-named-as-default": 0,
"import/no-extraneous-dependencies": ["error", { "devDependencies": true }],
"import/extensions": 0,
"max-len": ["warn", { "code": 100 , "ignoreComments": true }],
"quotes": ["warn", "single", { "allowTemplateLiterals": true }]<% if (options.react) { %>,
"import/no-unresolved": 0,
"prettier/prettier": ["error"],
"react/destructuring-assignment": 0,
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx", ".ts", ".tsx"] }],
"react/jsx-wrap-multilines": 0,
<% if (options.typescript) { %>
"react/prop-types": 0,
"no-use-before-define": "off",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/explicit-member-accessibility": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-object-literal-type-assertion": "off",
"@typescript-eslint/no-use-before-define": ["error"],
<% } %>
"react/jsx-no-bind": ["error", {
"ignoreDOMComponents": false,
"ignoreRefs": false,
"allowArrowFunctions": true,
"allowFunctions": false,
"allowBind": false
}]<% } %>
}<% if (options.react && options.jest) { %>,
"overrides": [
{
"files": [ "**/*.test.js" ],
"rules": {
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx", ".ts", ".tsx"] }]
}
}
]<% } %>
}