Skip to content

Commit 97e624d

Browse files
committed
fix: Update eslint-config including tests
This commit includes significant updates to the eslint-config package, primarily focusing on adding tests, updating dependencies, and refining configurations. It also includes updates for related configurations and dependencies within other files such as the package.json. The eslint-config updates include the addition of 'test' and 'test:coverage' scripts to offer more robust testing capabilities. Many dependencies within the package have been bumped to newer versions. Notably the "@eslint/js" package is updated to "^8.50.0", alongside updates to various rules and configurations. A new suite of tests has also been added to verify the old config installations and operation. This commit is part of an ongoing effort to ensure that our packages remain up-to-date, robust and maintainable. It bolsters the testing capabilities of the eslint-config package, helping to prevent regressions and ensure stability as new changes are introduced. This change will also refine and improve the linting rules and configurations used throughout the project. Signed-off-by: prisis <[email protected]>
1 parent 38535ab commit 97e624d

19 files changed

+2254
-961
lines changed

.eslintignore

+2
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,7 @@ packages/stylelint-config/.stylelintrc.js
99
packages/lint-staged-config/.lintstagedrc.js
1010
packages/eslint-config/src/global.d.ts
1111
packages/eslint-config/src/types.d.ts
12+
packages/eslint-config/__fixtures__/**
1213

1314
tsup.config.ts
15+
pnpm-lock.yaml

package.json

+8-4
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
"lint:text:fix": "textlint ./.github/ ./packages/** ./README.md ./UPGRADE.md --parallel --experimental --fix",
7171
"prettier": "prettier --config=.prettierrc.js --write '**/*.{js,jsx,cjs,tsx,ts,less,md,json}'",
7272
"sort-package-json": "sort-package-json ./packages/**/package.json ./package.json",
73-
"test:all": "nx run-many --target=test:coverage --projects=browserslist-config-anolilab,package-json-utils,stylelint-config && pnpm test:stylelint && pnpm test:babel",
73+
"test:all": "nx run-many --target=test:coverage --projects=browserslist-config-anolilab,package-json-utils,stylelint-config,eslint-config && pnpm test:stylelint && pnpm test:babel",
7474
"test:babel": "babel --config-file=./packages/babel-preset/dist/index.js ./packages/babel-preset/fixture/test.ts --out-file=./packages/babel-preset/fixture/test.js",
7575
"test:browserslist-config-anolilab": "pnpm --filter \"browserslist-config-anolilab\" run test",
7676
"test:coverage:browserslist-config-anolilab": "pnpm --filter \"browserslist-config-anolilab\" run test:coverage",
@@ -79,6 +79,7 @@
7979
"test:coverage:stylelint-config": "pnpm --filter \"stylelint-config\" run test:coverage",
8080
"test:lint-staged-config": "pnpm --filter \"lint-staged-config\" run test",
8181
"test:package-json-utils": "pnpm --filter \"package-json-utils\" run test",
82+
"test:eslint-config": "pnpm --filter \"eslint-config\" run test",
8283
"test:stylelint": "node scripts/isNotWindows || stylelint --formatter verbose --config packages/stylelint-config/index.js ./packages/stylelint-config/__tests__/css/**/*.css",
8384
"test:stylelint-config": "pnpm --filter \"stylelint-config\" run test"
8485
},
@@ -107,8 +108,9 @@
107108
"cz-conventional-changelog": "^3.3.0",
108109
"eslint": "^8.50.0",
109110
"eslint-plugin-etc": "^2.0.3",
110-
"eslint-plugin-typescript-sort-keys": "^3.0.0",
111111
"eslint-plugin-vitest": "^0.3.1",
112+
"eslint-plugin-editorconfig": "^4.0.3",
113+
"eslint-plugin-vitest-globals": "^1.4.0",
112114
"husky": "^8.0.3",
113115
"is-ci": "^3.0.1",
114116
"lint-staged": "^14.0.1",
@@ -136,9 +138,11 @@
136138
"eslint": {
137139
"config": "./.eslintrc.js"
138140
}
139-
},
141+
}
142+
},
143+
"eslint-config": {
140144
"plugin": {
141-
"eslint-plugin-tsdoc": false
145+
"tsdoc": false
142146
}
143147
}
144148
},
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
packages/semantic-release-preset/commitlint.config.js
2+
packages/semantic-release-preset/.czrc
3+
packages/prettier-config/.prettierrc.js
4+
packages/textlint-config/.textlintrc
5+
packages/babel-preset/babel.config.js
6+
packages/babel-preset/fixture/test.js
7+
packages/babel-preset/fixture/test.ts
8+
packages/stylelint-config/.stylelintrc.js
9+
packages/lint-staged-config/.lintstagedrc.js
10+
packages/eslint-config/src/global.d.ts
11+
packages/eslint-config/src/types.d.ts
12+
13+
tsup.config.ts
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
const config = require("@anolilab/eslint-config");
2+
const globals = require("@anolilab/eslint-config/globals");
3+
4+
module.exports = {
5+
...config,
6+
extends: [...config.extends, "@anolilab/eslint-config/typescript-type-checking"],
7+
globals: {
8+
...config?.globals,
9+
...globals.es2021,
10+
},
11+
overrides: [
12+
...config.overrides,
13+
{
14+
files: ["*.ts", "*.mts", "*.cts", "*.tsx", ".mdx"],
15+
parserOptions: {
16+
project: true,
17+
tsconfigRootDir: __dirname,
18+
},
19+
},
20+
],
21+
root: true,
22+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
console.log("hello world");
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"name": "test-package",
3+
"devDependencies": {
4+
"@anolilab/eslint-config": "file:../../dist",
5+
"eslint": "latest",
6+
"eslint-plugin-import": "npm:[email protected]"
7+
}
8+
}

0 commit comments

Comments
 (0)