forked from blitz-js/blitz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
40 lines (40 loc) · 1.16 KB
/
.eslintrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
module.exports = {
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: 6,
sourceType: "module",
ecmaFeatures: {
jsx: true,
},
project: `./tsconfig.json`,
},
plugins: ["@typescript-eslint", "import", "unicorn"],
extends: ["react-app"],
rules: {
"react/react-in-jsx-scope": "off", // React is always in scope with Blitz
"jsx-a11y/anchor-is-valid": "off", //Doesn't play well with Blitz/Next <Link> usage
"import/first": "off",
"import/no-default-export": "error",
"require-await": "error",
"no-async-promise-executor": "error",
"unicorn/filename-case": [
"error",
{
case: "kebabCase",
},
],
"@typescript-eslint/no-floating-promises": "error",
"no-use-before-define": ["error", {functions: false, classes: false}],
},
ignorePatterns: ["packages/cli/", "packages/generator/templates", ".eslintrc.js"],
overrides: [
{
files: ["examples/**", "packages/gui/**", "recipes/**"],
rules: {
"import/no-default-export": "off",
"unicorn/filename-case": "off",
"@typescript-eslint/no-floating-promises": "off",
},
},
],
}