|
1 | | -"use strict" |
2 | | - |
3 | 1 | // const version = require("./package.json").version |
4 | 2 |
|
5 | 3 | module.exports = { |
6 | 4 | parserOptions: { |
7 | | - sourceType: "script", |
| 5 | + // sourceType: "script", |
8 | 6 | ecmaVersion: 2020, |
| 7 | + project: require.resolve("./tsconfig.json"), |
9 | 8 | }, |
10 | 9 | extends: [ |
11 | | - "plugin:@mysticatea/es2015", |
12 | | - "plugin:@mysticatea/+node", |
13 | | - "plugin:@mysticatea/+eslint-plugin", |
| 10 | + "plugin:@ota-meshi/recommended", |
| 11 | + "plugin:@ota-meshi/+node", |
| 12 | + "plugin:@ota-meshi/+typescript", |
| 13 | + "plugin:@ota-meshi/+eslint-plugin", |
| 14 | + "plugin:@ota-meshi/+vue2", |
| 15 | + "plugin:@ota-meshi/+prettier", |
| 16 | + // "plugin:@ota-meshi/+json", |
14 | 17 | ], |
15 | 18 | rules: { |
16 | 19 | "require-jsdoc": "error", |
17 | 20 | "no-warning-comments": "warn", |
18 | 21 | "no-lonely-if": "off", |
19 | | - "@mysticatea/ts/ban-ts-ignore": "off", |
| 22 | + "@typescript-eslint/no-non-null-assertion": "off", |
| 23 | + "@typescript-eslint/no-explicit-any": "off", |
| 24 | + "no-shadow": "off", |
20 | 25 | }, |
21 | 26 | overrides: [ |
22 | 27 | { |
23 | 28 | files: ["*.ts"], |
24 | 29 | rules: { |
25 | | - // "@mysticatea/ts/no-require-imports": "off", |
26 | | - // "@mysticatea/ts/no-var-requires": "off", |
27 | | - "@mysticatea/node/no-missing-import": "off", |
28 | | - "no-implicit-globals": "off", |
29 | | - "@mysticatea/node/no-extraneous-import": "off", |
| 30 | + "@typescript-eslint/naming-convention": [ |
| 31 | + "error", |
| 32 | + { |
| 33 | + selector: "default", |
| 34 | + format: ["camelCase"], |
| 35 | + leadingUnderscore: "allow", |
| 36 | + trailingUnderscore: "allow", |
| 37 | + }, |
| 38 | + { |
| 39 | + selector: "variable", |
| 40 | + format: ["camelCase", "UPPER_CASE"], |
| 41 | + leadingUnderscore: "allow", |
| 42 | + trailingUnderscore: "allow", |
| 43 | + }, |
| 44 | + { |
| 45 | + selector: "typeLike", |
| 46 | + format: ["PascalCase"], |
| 47 | + }, |
| 48 | + { |
| 49 | + selector: "method", |
| 50 | + format: ["camelCase", "UPPER_CASE", "PascalCase"], |
| 51 | + }, |
| 52 | + ], |
30 | 53 | }, |
| 54 | + parser: "@typescript-eslint/parser", |
31 | 55 | parserOptions: { |
32 | 56 | sourceType: "module", |
33 | 57 | project: "./tsconfig.json", |
34 | 58 | }, |
35 | 59 | }, |
36 | | - { |
37 | | - files: ["lib/rules/**"], |
38 | | - rules: { |
39 | | - "@mysticatea/eslint-plugin/report-message-format": [ |
40 | | - "error", |
41 | | - "[^a-z].*\\.$", |
42 | | - ], |
43 | | - "@mysticatea/eslint-plugin/require-meta-docs-url": "off", |
44 | | - }, |
45 | | - }, |
| 60 | + // { |
| 61 | + // files: ["lib/rules/**"], |
| 62 | + // rules: { |
| 63 | + // "eslint-plugin/report-message-format": [ |
| 64 | + // "error", |
| 65 | + // "[^a-z].*\\.$", |
| 66 | + // ], |
| 67 | + // "eslint-plugin/require-meta-docs-url": "off", |
| 68 | + // }, |
| 69 | + // }, |
46 | 70 | { |
47 | 71 | files: ["scripts/**/*.ts", "tests/**/*.ts"], |
48 | 72 | rules: { |
49 | 73 | "require-jsdoc": "off", |
50 | 74 | "no-console": "off", |
| 75 | + "@typescript-eslint/ban-ts-comment": "off", |
51 | 76 | }, |
52 | 77 | }, |
53 | | - { |
54 | | - files: ["*.vue"], |
55 | | - parserOptions: { |
56 | | - sourceType: "module", |
57 | | - }, |
58 | | - globals: { |
59 | | - require: true, |
60 | | - }, |
61 | | - }, |
62 | | - { |
63 | | - files: ["docs/.vuepress/**"], |
64 | | - parserOptions: { |
65 | | - sourceType: "module", |
66 | | - ecmaVersion: 2020, |
67 | | - parser: "babel-eslint", |
68 | | - }, |
69 | | - globals: { |
70 | | - window: true, |
71 | | - }, |
72 | | - rules: { |
73 | | - "require-jsdoc": "off", |
74 | | - "@mysticatea/vue/html-closing-bracket-newline": "off", |
75 | | - "@mysticatea/vue/max-attributes-per-line": "off", |
76 | | - "@mysticatea/vue/comma-dangle": "off", |
77 | | - "@mysticatea/vue/html-indent": "off", |
78 | | - "@mysticatea/vue/html-self-closing": "off", |
79 | | - "@mysticatea/node/no-unsupported-features/es-syntax": "off", |
80 | | - "@mysticatea/node/no-missing-import": "off", |
81 | | - "@mysticatea/node/no-missing-require": "off", |
82 | | - }, |
83 | | - }, |
| 78 | + // { |
| 79 | + // files: ["*.vue"], |
| 80 | + // parserOptions: { |
| 81 | + // sourceType: "module", |
| 82 | + // }, |
| 83 | + // globals: { |
| 84 | + // require: true, |
| 85 | + // }, |
| 86 | + // }, |
| 87 | + // { |
| 88 | + // files: ["docs/.vuepress/**"], |
| 89 | + // parserOptions: { |
| 90 | + // sourceType: "module", |
| 91 | + // ecmaVersion: 2020, |
| 92 | + // parser: "babel-eslint", |
| 93 | + // }, |
| 94 | + // globals: { |
| 95 | + // window: true, |
| 96 | + // }, |
| 97 | + // rules: { |
| 98 | + // "require-jsdoc": "off", |
| 99 | + // }, |
| 100 | + // }, |
84 | 101 | ], |
85 | 102 | } |
0 commit comments