Skip to content

Commit

Permalink
clean eslint overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
Shuunen committed Dec 11, 2023
1 parent f63b204 commit 24b5b39
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 26 deletions.
2 changes: 2 additions & 0 deletions .dependency-cruiser.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable import/no-commonjs */
/* eslint-disable import/unambiguous */
/* eslint-disable max-lines */
/* eslint-disable multiline-comment-style */
/** @type {import('dependency-cruiser').IConfiguration} */
Expand Down
15 changes: 3 additions & 12 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,13 @@
"hardcore/ts"
],
"overrides": [
{
"files": [
"*.test.ts"
],
"rules": {
"func-names": "off"
}
},
{
"files": [
"*.js"
],
"rules": {
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/prefer-readonly-parameter-types": "off",
"import/no-commonjs": "off",
"import/unambiguous": "off",
"putout/putout": "off"
"@typescript-eslint/prefer-readonly-parameter-types": "off"
}
}
],
Expand Down Expand Up @@ -111,6 +100,7 @@
"error",
"always-multiline"
],
"compat/compat": "off",
"curly": [
"error",
"multi"
Expand Down Expand Up @@ -153,6 +143,7 @@
"always"
],
"padding-line-between-statements": "off",
"prefer-destructuring": "off",
"prettier/prettier": "off",
"putout/putout": "off",
"quote-props": [
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@
"postversion": "git push && git push --tags && pnpm build && npm publish",
"preversion": "pnpm check",
"start": "pnpm build:start && echo start success",
"test": "pnpm test:watch --run && echo test success",
"test:bench": "vitest bench",
"test": "vitest --coverage --run && echo test success",
"test:bench": "vitest bench && echo test bench success",
"test:update": "vitest --run --update && echo test update success",
"test:watch": "vitest --coverage"
},
Expand Down
2 changes: 2 additions & 0 deletions templates/.dependency-cruiser.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable import/no-commonjs */
/* eslint-disable import/unambiguous */
/* eslint-disable no-useless-escape */
/* eslint-disable multiline-comment-style */
/* eslint-disable max-lines */
Expand Down
4 changes: 2 additions & 2 deletions tests/__snapshots__/check.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ exports[`check C data/tsProject 1`] = `
"warnings": [
"use-dependency-cruiser",
"eslintrc-json-could-have-unicorn-rules-extend-plugin-unicorn-all",
"eslintrc-json-current-eslintrc-json-has-only-1-of-the-62-custom-rules-in-repo-checker-eslintrc-json",
"eslintrc-json-current-eslintrc-json-has-only-1-of-the-64-custom-rules-in-repo-checker-eslintrc-json",
"has-a-npmrc-file",
"package-json-main-file-maximum-size-is-specified-in-data-file-ex-max-size-ko-100",
"package-json-could-have-a-schema-declaration-like-schema-https-json-schemastore-org-package-43m30m-fixable-39m49m",
Expand Down Expand Up @@ -332,7 +332,7 @@ exports[`check E data folders and not throw 1`] = `
"warnings": [
"use-dependency-cruiser",
"eslintrc-json-could-have-unicorn-rules-extend-plugin-unicorn-all",
"eslintrc-json-current-eslintrc-json-has-only-1-of-the-62-custom-rules-in-repo-checker-eslintrc-json",
"eslintrc-json-current-eslintrc-json-has-only-1-of-the-64-custom-rules-in-repo-checker-eslintrc-json",
"has-a-npmrc-file",
"package-json-main-file-maximum-size-is-specified-in-data-file-ex-max-size-ko-100",
"package-json-could-have-a-schema-declaration-like-schema-https-json-schemastore-org-package-43m30m-fixable-39m49m",
Expand Down
1 change: 1 addition & 0 deletions tests/data/vueProject/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// eslint-disable-next-line import/unambiguous, import/no-commonjs
module.exports = {
content: ['public/*.html', './src/**/*.{vue,js,ts,jsx,tsx}'],
safelist: [
Expand Down
20 changes: 11 additions & 9 deletions tests/files/__snapshots__/eslint.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ exports[`eslint B config file empty 1`] = `
"could-have-hardcore-rules-extend-hardcore",
"could-have-eslint-recommended-rules-extend-eslint-recommended",
"could-have-unicorn-rules-extend-plugin-unicorn-all",
"current-eslintrc-json-has-only-16-of-the-62-custom-rules-in-repo-checker-eslintrc-json",
"current-eslintrc-json-has-only-16-of-the-64-custom-rules-in-repo-checker-eslintrc-json",
],
}
`;
Expand Down Expand Up @@ -142,7 +142,7 @@ exports[`eslint C config file empty for ts project 1`] = `
"could-have-hardcore-rules-extend-hardcore",
"could-have-eslint-recommended-rules-extend-eslint-recommended",
"could-have-unicorn-rules-extend-plugin-unicorn-all",
"current-eslintrc-json-has-only-0-of-the-62-custom-rules-in-repo-checker-eslintrc-json",
"current-eslintrc-json-has-only-0-of-the-64-custom-rules-in-repo-checker-eslintrc-json",
"could-have-hardcore-typescript-rules-extend-hardcore-ts",
],
}
Expand Down Expand Up @@ -196,7 +196,7 @@ exports[`eslint D config file empty for vue ts project 1`] = `
"could-have-hardcore-rules-extend-hardcore",
"could-have-eslint-recommended-rules-extend-eslint-recommended",
"could-have-unicorn-rules-extend-plugin-unicorn-all",
"current-eslintrc-json-has-only-0-of-the-69-custom-rules-in-repo-checker-eslintrc-json",
"current-eslintrc-json-has-only-0-of-the-71-custom-rules-in-repo-checker-eslintrc-json",
"could-have-hardcore-typescript-rules-extend-hardcore-ts",
],
}
Expand Down Expand Up @@ -249,7 +249,7 @@ exports[`eslint E config file empty for tailwind project 1`] = `
"could-have-hardcore-rules-extend-hardcore",
"could-have-eslint-recommended-rules-extend-eslint-recommended",
"could-have-unicorn-rules-extend-plugin-unicorn-all",
"current-eslintrc-json-has-only-16-of-the-62-custom-rules-in-repo-checker-eslintrc-json",
"current-eslintrc-json-has-only-16-of-the-64-custom-rules-in-repo-checker-eslintrc-json",
],
}
`;
Expand Down Expand Up @@ -309,7 +309,7 @@ exports[`eslint F config partial file for js project 1`] = `
"warnings": [
"could-have-hardcore-rules-extend-hardcore",
"could-have-unicorn-rules-extend-plugin-unicorn-all",
"current-eslintrc-json-has-only-16-of-the-62-custom-rules-in-repo-checker-eslintrc-json",
"current-eslintrc-json-has-only-16-of-the-64-custom-rules-in-repo-checker-eslintrc-json",
],
}
`;
Expand Down Expand Up @@ -368,7 +368,7 @@ exports[`eslint G config partial file for ts project 1`] = `
"warnings": [
"could-have-hardcore-rules-extend-hardcore",
"could-have-unicorn-rules-extend-plugin-unicorn-all",
"current-eslintrc-json-has-only-0-of-the-62-custom-rules-in-repo-checker-eslintrc-json",
"current-eslintrc-json-has-only-0-of-the-64-custom-rules-in-repo-checker-eslintrc-json",
"could-have-hardcore-typescript-rules-extend-hardcore-ts",
],
}
Expand Down Expand Up @@ -440,7 +440,7 @@ exports[`eslint H config partial file for vue ts project 1`] = `
"warnings": [
"could-have-hardcore-rules-extend-hardcore",
"could-have-unicorn-rules-extend-plugin-unicorn-all",
"current-eslintrc-json-has-only-0-of-the-69-custom-rules-in-repo-checker-eslintrc-json",
"current-eslintrc-json-has-only-0-of-the-71-custom-rules-in-repo-checker-eslintrc-json",
"could-have-hardcore-typescript-rules-extend-hardcore-ts",
],
}
Expand Down Expand Up @@ -578,7 +578,7 @@ exports[`eslint J config file with no rules 1`] = `
],
"warnings": [
"eslintrc-json-could-have-unicorn-rules-extend-plugin-unicorn-all",
"eslintrc-json-current-eslintrc-json-has-only-16-of-the-62-custom-rules-in-repo-checker-eslintrc-json",
"eslintrc-json-current-eslintrc-json-has-only-16-of-the-64-custom-rules-in-repo-checker-eslintrc-json",
],
}
`;
Expand Down Expand Up @@ -654,7 +654,7 @@ exports[`eslint K config file with just rules (no override) 1`] = `
],
"warnings": [
"eslintrc-json-could-have-unicorn-rules-extend-plugin-unicorn-all",
"eslintrc-json-current-eslintrc-json-has-only-17-of-the-62-custom-rules-in-repo-checker-eslintrc-json",
"eslintrc-json-current-eslintrc-json-has-only-17-of-the-64-custom-rules-in-repo-checker-eslintrc-json",
],
}
`;
Expand Down Expand Up @@ -839,6 +839,7 @@ exports[`eslint M fix rules in overrides 1`] = `
"error",
"always-multiline"
],
"compat/compat": "off",
"curly": [
"error",
"multi"
Expand Down Expand Up @@ -881,6 +882,7 @@ exports[`eslint M fix rules in overrides 1`] = `
"always"
],
"padding-line-between-statements": "off",
"prefer-destructuring": "off",
"prettier/prettier": "off",
"putout/putout": "off",
"quote-props": [
Expand Down
4 changes: 3 additions & 1 deletion tests/files/__snapshots__/tailwind.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ exports[`tailwind : can detect valid config 1`] = `
},
"failed": [],
"fileContent": "/** @type {import('tailwindcss').Config} */
// eslint-disable-next-line import/unambiguous, import/no-commonjs
module.exports = {
content: ['public/*.html', './src/**/*.{vue,js,ts,jsx,tsx}'],
safelist: [
Expand All @@ -48,7 +49,8 @@ module.exports = {
}
",
"fileName": "",
"originalFileContent": "module.exports = {
"originalFileContent": "// eslint-disable-next-line import/unambiguous, import/no-commonjs
module.exports = {
content: ['public/*.html', './src/**/*.{vue,js,ts,jsx,tsx}'],
safelist: [
{
Expand Down

0 comments on commit 24b5b39

Please sign in to comment.