Skip to content

Commit 7deb460

Browse files
author
chizuki
committed
Merge branch 'main' of github.com:chizukicn/eslint-config into main
2 parents b12805b + 9a15a1c commit 7deb460

File tree

13 files changed

+42
-15
lines changed

13 files changed

+42
-15
lines changed

.eslintrc.json .eslintrc

File renamed without changes.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@curev/eslint-config-monorepo",
3-
"version": "0.0.3",
3+
"version": "0.0.6",
44
"private": true,
55
"packageManager": "[email protected]",
66
"author": "Anthony Fu <[email protected]> (https://github.com/antfu/)",

packages/all/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@curev/eslint-config",
3-
"version": "0.0.3",
3+
"version": "0.0.6",
44
"description": "Anthony's ESLint config",
55
"author": "Anthony Fu <[email protected]> (https://github.com/antfu/)",
66
"license": "MIT",

packages/basic/index.js

+7-2
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ module.exports = {
3535
"html",
3636
"unicorn",
3737
"curev",
38+
"unused-imports",
3839
"no-only-tests"
3940
],
4041
settings: {
@@ -191,7 +192,6 @@ module.exports = {
191192
"curly": ["error", "all"],
192193
"quotes": ["error", "double"],
193194
"quote-props": ["error", "consistent-as-needed"],
194-
"no-unused-vars": "warn",
195195
"no-param-reassign": "off",
196196
"array-bracket-spacing": ["error", "never"],
197197
"brace-style": ["error", "1tbs", { allowSingleLine: true }],
@@ -309,7 +309,12 @@ module.exports = {
309309
"unicorn/prefer-type-error": "error",
310310
// Use new when throwing error
311311
"unicorn/throw-new-error": "error",
312-
312+
"no-unused-vars": "off", // or "@typescript-eslint/no-unused-vars": "off",
313+
"unused-imports/no-unused-imports": "error",
314+
"unused-imports/no-unused-vars": [
315+
"error",
316+
{ vars: "all", varsIgnorePattern: "^_", args: "after-used", argsIgnorePattern: "^_" }
317+
],
313318
"no-use-before-define": ["error", { functions: false, classes: false, variables: true }],
314319
"eslint-comments/disable-enable-pair": "off",
315320
"import/no-named-as-default-member": "off",

packages/basic/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@curev/eslint-config-basic",
3-
"version": "0.0.3",
3+
"version": "0.0.6",
44
"description": "",
55
"author": "Anthony Fu <[email protected]> (https://github.com/antfu/)",
66
"license": "MIT",
@@ -29,6 +29,7 @@
2929
"eslint-plugin-no-only-tests": "^3.1.0",
3030
"eslint-plugin-promise": "^6.1.1",
3131
"eslint-plugin-unicorn": "^44.0.2",
32+
"eslint-plugin-unused-imports": "^2.0.0",
3233
"eslint-plugin-yml": "^1.2.0",
3334
"jsonc-eslint-parser": "^2.1.0",
3435
"yaml-eslint-parser": "^1.1.0"

packages/basic/standard.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ module.exports = {
185185
"object-curly-spacing": ["error", "always"],
186186
"object-property-newline": ["error", { allowMultiplePropertiesPerLine: true }],
187187
"one-var": ["error", { initialized: "never" }],
188-
"operator-linebreak": ["error", "after", { overrides: { "?": "before", ":": "before", "|>": "before" } }],
188+
"operator-linebreak": ["error", "after", { overrides: { "?": "before", ":": "before", "|>": "before", "&&": "before" } }],
189189
"padded-blocks": ["error", { blocks: "never", switches: "never", classes: "never" }],
190190
"prefer-const": ["error", { destructuring: "all" }],
191191
"prefer-promise-reject-errors": "error",

packages/eslint-plugin-curev/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eslint-plugin-curev",
3-
"version": "0.0.3",
3+
"version": "0.0.6",
44
"license": "MIT",
55
"homepage": "https://github.com/antfu/eslint-config",
66
"main": "./dist/index.cjs",

packages/react/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@curev/eslint-config-react",
3-
"version": "0.0.3",
3+
"version": "0.0.6",
44
"description": "",
55
"author": "Anthony Fu <[email protected]> (https://github.com/antfu/)",
66
"license": "MIT",

packages/typescript/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ module.exports = {
1414
overrides: basic.overrides,
1515
rules: {
1616
"import/named": "off",
17+
"semi": "off",
1718

1819
// TS
1920
"@typescript-eslint/ban-ts-comment": ["error", { "ts-ignore": "allow-with-description" }],
@@ -65,7 +66,7 @@ module.exports = {
6566
offsetTernaryExpressions: true
6667
}],
6768
"no-unused-vars": "off",
68-
"@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
69+
"@typescript-eslint/no-unused-vars": "off",
6970
"no-redeclare": "off",
7071
"@typescript-eslint/no-redeclare": "error",
7172
"no-use-before-define": "off",
@@ -76,7 +77,6 @@ module.exports = {
7677
"@typescript-eslint/comma-dangle": ["error", "never"],
7778
"object-curly-spacing": "off",
7879
"@typescript-eslint/object-curly-spacing": ["error", "always"],
79-
"semi": "off",
8080
"@typescript-eslint/semi": ["error", "always"],
8181
"quotes": "off",
8282
"@typescript-eslint/quotes": ["error", "double"],

packages/typescript/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@curev/eslint-config-ts",
3-
"version": "0.0.3",
3+
"version": "0.0.6",
44
"description": "",
55
"author": "Anthony Fu <[email protected]> (https://github.com/antfu/)",
66
"license": "MIT",

packages/vue/index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ module.exports = {
1515
parser: "@typescript-eslint/parser"
1616
},
1717
rules: {
18-
"no-unused-vars": "off",
1918
"no-undef": "off",
2019
"indent": "off",
21-
"@typescript-eslint/indent": "off",
2220
"multiline-ternary": "off",
2321
...(TS
24-
? { "@typescript-eslint/no-unused-vars": "off" }
22+
? {
23+
"@typescript-eslint/indent": "off"
24+
}
2525
: null)
2626
}
2727
}

packages/vue/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@curev/eslint-config-vue",
3-
"version": "0.0.3",
3+
"version": "0.0.6",
44
"description": "",
55
"author": "Anthony Fu <[email protected]> (https://github.com/antfu/)",
66
"license": "MIT",

pnpm-lock.yaml

+21
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)