Skip to content

Commit 240e691

Browse files
authored
chore: hourcekeeping, bump all (dev) deps, add lint steps (#239)
1 parent 53b316c commit 240e691

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+11330
-7493
lines changed

.codesandbox/ci.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{
2-
"node": "18",
3-
"installCommand": "codesandbox:install",
2+
"node": "20",
43
"sandboxes": []
54
}

.commitlintrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "@1stg"
3+
}

.env.yarn

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ESLINT_USE_FLAT_CONFIG=false

.eslintignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
.yarn
12
lib
23
coverage
34
node_modules

.eslintrc.js

+3
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,11 @@ module.exports = {
99
'plugin:@typescript-eslint/recommended',
1010
'plugin:eslint-plugin/recommended',
1111
'plugin:import-x/recommended',
12+
'plugin:json/recommended-legacy',
1213
'plugin:n/recommended',
1314
'plugin:unicorn/recommended',
15+
'plugin:yml/standard',
16+
'plugin:yml/prettier',
1417
'plugin:prettier/recommended',
1518
],
1619
env: {

.github/workflows/ci.yml

+6-15
Original file line numberDiff line numberDiff line change
@@ -42,41 +42,32 @@ jobs:
4242
with:
4343
node-version: ${{ matrix.node }}
4444

45-
- name: Enable Corepack
46-
run: corepack enable
47-
4845
- name: Setup Node.js ${{ matrix.node }} with cache
4946
uses: actions/setup-node@v4
5047
with:
5148
node-version: ${{ matrix.node }}
5249
cache: yarn
53-
env:
54-
# https://github.com/actions/setup-node/issues/531#issuecomment-1819151412
55-
SKIP_YARN_COREPACK_CHECK: 1
5650

5751
- name: Install ESLint ${{ matrix.eslint }}
5852
run: |
59-
yarn add -D --ignore-engines eslint@${{ matrix.eslint }}
53+
yarn add -D eslint@${{ matrix.eslint }}
6054
6155
- name: Install Dependencies
62-
run: yarn --ignore-engines
63-
env:
64-
SKIP_YARN_COREPACK_CHECK: 1
56+
run: yarn --immutable
6557

6658
- name: Build and Test
6759
run: |
6860
yarn test-compiled
6961
yarn test
70-
env:
71-
SKIP_YARN_COREPACK_CHECK: 1
7262
7363
- name: Lint
7464
run: yarn lint
65+
if: ${{ matrix.executeLint }}
7566
env:
7667
EFF_NO_LINK_RULES: true
7768
PARSER_NO_WATCH: true
78-
SKIP_YARN_COREPACK_CHECK: 1
79-
if: ${{ matrix.executeLint }}
8069

8170
- name: Codecov
82-
uses: codecov/codecov-action@v3
71+
uses: codecov/codecov-action@v5
72+
with:
73+
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/codeql.yml

+4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
schedule:
77
- cron: '41 19 * * 6'
88

9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
913
jobs:
1014
analyze:
1115
name: Analyze

.github/workflows/release.yml

-8
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ jobs:
1616
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
1717
fetch-depth: 0
1818

19-
- name: Enable Corepack
20-
run: corepack enable
21-
2219
- name: Setup Node.js LTS
2320
uses: actions/setup-node@v4
2421
with:
@@ -30,14 +27,10 @@ jobs:
3027

3128
- name: Install Dependencies
3229
run: yarn --immutable
33-
env:
34-
SKIP_YARN_COREPACK_CHECK: 1
3530

3631
# required for linting before commit
3732
- name: Build
3833
run: yarn build
39-
env:
40-
SKIP_YARN_COREPACK_CHECK: 1
4134

4235
- name: Create Release Pull Request or Publish to npm
4336
id: changesets
@@ -49,4 +42,3 @@ jobs:
4942
env:
5043
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5144
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
52-
SKIP_YARN_COREPACK_CHECK: 1

.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,9 @@ lib/
3838
# macOS
3939
.DS_Store
4040
.*cache
41+
42+
.yarn/*
43+
!.yarn/patches
44+
!.yarn/plugins
45+
!.yarn/releases
46+
!.yarn/sdks

.lintstagedrc.mjs

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default } from '@1stg/lint-staged/tsc'

.prettierignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
.yarn
12
test/fixtures/just-json-files/invalid.json
23
test/fixtures/malformed.js
34
test/fixtures/with-syntax-error/package.json

.renovaterc

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"extends": [
3+
"github>1stG/configs"
4+
]
5+
}

.simple-git-hooks.js

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = require('@1stg/simple-git-hooks')
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports={name:"plugin-prepare-lifecycle",factory:e=>({hooks:{afterAllInstalled(r){if(!r.topLevelWorkspace.manifest.scripts.get("prepare"))return;e("@yarnpkg/shell").execute("yarn prepare")}}})};

.yarn/releases/yarn-4.7.0.cjs

+935
Large diffs are not rendered by default.

.yarnrc.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
enableTelemetry: false
2+
3+
nodeLinker: node-modules
4+
5+
plugins:
6+
- checksum: 37b2361b1502b2054e6779788c0e9bdd6a90ce49852a8cad2feda79b0614ec94f06fb6e78951f5f95429c610d7934dd077caa47413a0227378a102c55161616d
7+
path: .yarn/plugins/plugin-prepare-lifecycle.cjs
8+
spec: 'https://github.com/un-es/yarn-plugin-prepare-lifecycle/releases/download/v0.0.1/index.js'
9+
10+
yarnPath: .yarn/releases/yarn-4.7.0.cjs

package.json

+63-59
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"repository": "git+https://github.com/un-ts/eslint-plugin-import-x",
66
"author": "JounQin <[email protected]> (https://www.1stG.me)",
77
"license": "MIT",
8-
"packageManager": "yarn@1.22.22",
8+
"packageManager": "yarn@4.7.0",
99
"engines": {
1010
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
1111
},
@@ -32,12 +32,11 @@
3232
"scripts": {
3333
"build": "tsc -p src",
3434
"clean": "rimraf lib",
35-
"codesandbox:install": "yarn --ignore-engines",
36-
"lint": "run-p lint:*",
35+
"lint": "run-p 'lint:*'",
3736
"lint:docs": "yarn update:eslint-docs --check",
38-
"lint:es": "cross-env ESLINT_USE_FLAT_CONFIG=false eslint . --cache",
37+
"lint:es": "eslint . --cache",
3938
"lint:tsc": "tsc -p tsconfig.base.json --noEmit",
40-
"prepare": "patch-package",
39+
"prepare": "patch-package && simple-git-hooks && yarn-berry-deduplicate || exit 0",
4140
"release": "changeset publish",
4241
"test": "jest",
4342
"test-compiled": "yarn build && cross-env TEST_COMPILED=1 jest",
@@ -49,82 +48,87 @@
4948
},
5049
"dependencies": {
5150
"@types/doctrine": "^0.0.9",
52-
"@typescript-eslint/scope-manager": "^8.1.0",
53-
"@typescript-eslint/utils": "^8.1.0",
54-
"debug": "^4.3.4",
51+
"@typescript-eslint/utils": "^8.26.1",
52+
"debug": "^4.4.0",
5553
"doctrine": "^3.0.0",
5654
"eslint-import-resolver-node": "^0.3.9",
57-
"get-tsconfig": "^4.7.3",
55+
"get-tsconfig": "^4.10.0",
5856
"is-glob": "^4.0.3",
59-
"minimatch": "^9.0.3",
57+
"minimatch": "^10.0.1",
6058
"oxc-resolver": "^5.0.0",
61-
"semver": "^7.6.3",
62-
"stable-hash": "^0.0.4",
63-
"tslib": "^2.6.3"
59+
"semver": "^7.7.1",
60+
"stable-hash": "^0.0.5",
61+
"tslib": "^2.8.1"
6462
},
6563
"devDependencies": {
66-
"@1stg/prettier-config": "^4.0.1",
67-
"@1stg/tsconfig": "^2.3.3",
68-
"@angular-eslint/template-parser": "^17.5.2",
69-
"@babel/core": "^7.25.2",
70-
"@babel/eslint-parser": "^7.25.1",
71-
"@babel/plugin-proposal-decorators": "^7.24.7",
72-
"@babel/plugin-proposal-export-default-from": "^7.24.7",
73-
"@babel/preset-env": "^7.25.3",
74-
"@babel/preset-flow": "^7.24.7",
75-
"@babel/preset-react": "^7.24.7",
76-
"@babel/preset-typescript": "^7.24.7",
77-
"@babel/register": "^7.24.6",
78-
"@changesets/changelog-github": "^0.5.0",
79-
"@changesets/cli": "^2.27.1",
64+
"@1stg/commitlint-config": "^5.0.0",
65+
"@1stg/lint-staged": "^4.0.4",
66+
"@1stg/prettier-config": "^4.0.4",
67+
"@1stg/simple-git-hooks": "^0.2.4",
68+
"@1stg/tsconfig": "^3.0.0",
69+
"@angular-eslint/template-parser": "^19.2.1",
70+
"@babel/core": "^7.26.10",
71+
"@babel/eslint-parser": "^7.26.10",
72+
"@babel/plugin-proposal-decorators": "^7.25.9",
73+
"@babel/plugin-proposal-export-default-from": "^7.25.9",
74+
"@babel/preset-env": "^7.26.9",
75+
"@babel/preset-flow": "^7.25.9",
76+
"@babel/preset-react": "^7.26.3",
77+
"@babel/preset-typescript": "^7.26.0",
78+
"@babel/register": "^7.25.9",
79+
"@changesets/changelog-github": "^0.5.1",
80+
"@changesets/cli": "^2.28.1",
81+
"@commitlint/cli": "^19.8.0",
8082
"@eslint/import-test-order-redirect-scoped": "link:./test/fixtures/order-redirect-scoped",
81-
"@swc-node/jest": "^1.8.12",
82-
"@swc/core": "^1.7.6",
83-
"@swc/helpers": "^0.5.12",
83+
"@swc-node/jest": "^1.8.13",
84+
"@swc/core": "^1.11.9",
85+
"@swc/helpers": "^0.5.15",
8486
"@test-scope/some-module": "link:./test/fixtures/symlinked-module",
85-
"@total-typescript/ts-reset": "^0.5.1",
87+
"@total-typescript/ts-reset": "^0.6.1",
8688
"@types/debug": "^4.1.12",
8789
"@types/eslint": "^9.6.1",
88-
"@types/eslint8.56": "npm:@types/eslint@^8.56.11",
89-
"@types/eslint9": "npm:@types/eslint@^9.6.1",
90+
"@types/eslint8.56": "npm:@types/eslint@~8.56.0",
9091
"@types/is-glob": "^4.0.4",
91-
"@types/jest": "^29.5.12",
92+
"@types/jest": "^29.5.14",
9293
"@types/json-schema": "^7.0.15",
9394
"@types/klaw-sync": "^6.0.5",
94-
"@types/node": "^20.11.30",
95-
"@typescript-eslint/eslint-plugin": "^8.15.0",
96-
"@typescript-eslint/parser": "^8.15.0",
97-
"@typescript-eslint/rule-tester": "^8.15.0",
98-
"@unts/patch-package": "^8.0.0",
95+
"@types/node": "^20.17.24",
96+
"@typescript-eslint/eslint-plugin": "^8.26.1",
97+
"@typescript-eslint/parser": "^8.26.1",
98+
"@typescript-eslint/rule-tester": "^8.26.1",
99+
"@unts/patch-package": "^8.1.1",
99100
"cross-env": "^7.0.3",
100101
"escope": "^4.0.0",
101-
"eslint": "^9.15.0",
102-
"eslint-config-prettier": "^9.1.0",
103-
"eslint-doc-generator": "^1.7.1",
104-
"eslint-import-resolver-typescript": "^3.6.1",
105-
"eslint-import-resolver-webpack": "^0.13.8",
102+
"eslint": "^9.22.0",
103+
"eslint-config-prettier": "^10.1.1",
104+
"eslint-doc-generator": "^2.1.1",
105+
"eslint-import-resolver-typescript": "^3.8.7",
106+
"eslint-import-resolver-webpack": "^0.13.10",
106107
"eslint-import-test-order-redirect": "link:./test/fixtures/order-redirect",
107-
"eslint-plugin-eslint-plugin": "^5.4.1",
108+
"eslint-plugin-eslint-plugin": "^6.4.0",
108109
"eslint-plugin-import-x": "link:.",
109-
"eslint-plugin-jest": "^27.9.0",
110-
"eslint-plugin-json": "^3.1.0",
111-
"eslint-plugin-n": "^16.6.2",
112-
"eslint-plugin-prettier": "^5.1.3",
110+
"eslint-plugin-jest": "^28.11.0",
111+
"eslint-plugin-json": "^4.0.1",
112+
"eslint-plugin-n": "^17.16.2",
113+
"eslint-plugin-prettier": "^5.2.3",
113114
"eslint-plugin-unicorn": "^56.0.1",
114-
"eslint8.56": "npm:eslint@^8.56.0",
115-
"eslint9": "npm:eslint@^9.15.0",
116-
"hermes-eslint": "^0.23.1",
115+
"eslint-plugin-yml": "^1.17.0",
116+
"eslint8.56": "npm:eslint@~8.56.0",
117+
"eslint9": "npm:eslint@^9.22.0",
118+
"hermes-eslint": "^0.26.0",
117119
"jest": "^29.7.0",
118120
"klaw-sync": "^6.0.0",
119-
"npm-run-all2": "^6.1.2",
121+
"lint-staged": "^15.5.0",
122+
"npm-run-all2": "^7.0.2",
120123
"path-serializer": "^0.3.4",
121-
"prettier": "^3.2.5",
124+
"prettier": "^3.5.3",
122125
"redux": "^5.0.1",
123-
"rimraf": "^5.0.10",
124-
"svelte": "^4.2.12",
126+
"rimraf": "^6.0.1",
127+
"simple-git-hooks": "^2.11.1",
125128
"ts-node": "^10.9.2",
126-
"type-fest": "^4.14.0",
127-
"typescript": "^5.5.4",
128-
"zod": "^3.23.8"
129+
"type-fest": "^4.37.0",
130+
"typescript": "^5.8.2",
131+
"yarn-berry-deduplicate": "^6.1.1",
132+
"zod": "^3.24.2"
129133
}
130134
}

patches/eslint-compat-utils+0.5.0.patch

-40
This file was deleted.

src/rules/no-deprecated.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ export = createRule({
4040
},
4141
defaultOptions: [],
4242
create(context) {
43-
const deprecated = new Map()
44-
const namespaces = new Map()
43+
const deprecated = new Map<string, Tag>()
44+
const namespaces = new Map<string, ExportMap | null>()
4545

4646
return {
4747
Program({ body }) {
@@ -154,7 +154,7 @@ export = createRule({
154154
}
155155
context.report({
156156
node,
157-
...message(deprecated.get(node.name)),
157+
...message(deprecated.get(node.name)!),
158158
})
159159
},
160160

0 commit comments

Comments
 (0)