forked from remix-run/remix
-
Notifications
You must be signed in to change notification settings - Fork 20
/
.eslintrc.js
64 lines (61 loc) · 1.66 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
const OFF = 0;
const WARN = 1;
/** @type {import('eslint').Linter.Config} */
module.exports = {
root: true,
extends: [
require.resolve("./packages/remix-eslint-config/internal.js"),
"plugin:markdown/recommended",
],
plugins: ["markdown"],
settings: {
"import/internal-regex": "^~/",
},
overrides: [
{
files: ["**/*.md/**"],
rules: {
"import/no-extraneous-dependencies": OFF,
"no-dupe-keys": OFF,
"no-undef": OFF,
"no-unused-expressions": OFF,
"no-unused-vars": OFF,
"@typescript-eslint/no-redeclare": OFF,
},
},
{
files: ["rollup.config.js"],
rules: {
"import/no-extraneous-dependencies": OFF,
},
},
{
files: [
"**/*.md/*.js?(x)",
"**/*.md/*.ts?(x)",
"integration/helpers/cf-template/**/*.*",
"integration/helpers/deno-template/**/*.*",
"integration/helpers/node-template/**/*.*",
"packages/remix-dev/config/defaults/**/*.*",
"templates/**/*.*",
],
rules: {
"prefer-let/prefer-let": OFF,
"prefer-const": WARN,
"import/order": [
WARN,
{
alphabetize: { caseInsensitive: true, order: "asc" },
groups: ["builtin", "external", "internal", "parent", "sibling"],
"newlines-between": "always",
},
],
"react/jsx-no-leaked-render": [WARN, { validStrategies: ["ternary"] }],
},
},
],
// Report unused `eslint-disable` comments.
reportUnusedDisableDirectives: true,
// Tell ESLint not to ignore dot-files, which are ignored by default.
ignorePatterns: ["!.*.js"],
};