Skip to content

Commit efa3b21

Browse files
committed
Don't lint any git-ignored files
1 parent bc90695 commit efa3b21

File tree

4 files changed

+10
-0
lines changed

4 files changed

+10
-0
lines changed

eslint.config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
import path from 'node:path';
12
import { globalIgnores } from 'eslint/config';
23
import prettierRecommended from 'eslint-plugin-prettier/recommended';
34
import globals from 'globals';
45
import tsEslint from 'typescript-eslint';
6+
import { includeIgnoreFile } from '@eslint/compat';
57
import js from '@eslint/js';
68
import { FlatCompat } from '@eslint/eslintrc';
79

@@ -12,6 +14,7 @@ const compat = new FlatCompat({
1214
});
1315

1416
const config = tsEslint.config([
17+
includeIgnoreFile(path.resolve(__dirname, '.gitignore')),
1518
globalIgnores([
1619
// compiled code
1720
'node_package/lib/',

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"@babel/eslint-parser": "^7.26.10",
2424
"@babel/preset-env": "^7.20.2",
2525
"@babel/preset-react": "^7.26.3",
26+
"@eslint/compat": "^1.2.7",
2627
"@testing-library/dom": "^10.4.0",
2728
"@testing-library/jest-dom": "^6.6.3",
2829
"@testing-library/react": "^16.2.0",

script/convert

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ gsub_file_content("../package.json", /"globals": "[^"]*",/, "")
2121
gsub_file_content("../package.json", /"knip": "[^"]*",/, "")
2222
gsub_file_content("../package.json", /"typescript-eslint": "[^"]*",/, "")
2323
gsub_file_content("../package.json", %r{"@arethetypeswrong/cli": "[^"]*",}, "")
24+
gsub_file_content("../package.json", %r{"@eslint/compat": "[^"]*",}, "")
2425
gsub_file_content("../package.json", %r{"@testing-library/dom": "[^"]*",}, "")
2526
gsub_file_content("../package.json", %r{"@testing-library/react": "[^"]*",}, "")
2627
gsub_file_content("../package.json", /"knip": "[^"]*",/, "")

yarn.lock

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1073,6 +1073,11 @@
10731073
resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.12.1.tgz#cfc6cffe39df390a3841cde2abccf92eaa7ae0e0"
10741074
integrity sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==
10751075

1076+
"@eslint/compat@^1.2.7":
1077+
version "1.2.7"
1078+
resolved "https://registry.yarnpkg.com/@eslint/compat/-/compat-1.2.7.tgz#f1a890281631ad27530479420b743dd92626e819"
1079+
integrity sha512-xvv7hJE32yhegJ8xNAnb62ggiAwTYHBpUCWhRxEj/ksvgDJuSXfoDkBcRYaYNFiJ+jH0IE3K16hd+xXzhBgNbg==
1080+
10761081
"@eslint/config-array@^0.19.2":
10771082
version "0.19.2"
10781083
resolved "https://registry.yarnpkg.com/@eslint/config-array/-/config-array-0.19.2.tgz#3060b809e111abfc97adb0bb1172778b90cb46aa"

0 commit comments

Comments
 (0)