Skip to content

Commit fbc3a65

Browse files
committed
chore: Update dependencies
BREAKING CHANGE: Package is ESM only close: #1
1 parent b5cb8ea commit fbc3a65

15 files changed

+203
-226
lines changed

.eslintrc.cjs

Lines changed: 0 additions & 103 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- name: 'Checkout repository'
12-
uses: actions/checkout@v3
12+
uses: actions/checkout@v4
1313
- name: 'Setup node'
14-
uses: actions/setup-node@v3
14+
uses: actions/setup-node@v4
1515
with:
16-
node-version: 18
16+
node-version: 24
1717
- name: 'Install depependencies'
1818
run: npm install
1919
- name: 'Test'
@@ -27,11 +27,11 @@ jobs:
2727
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/next')
2828
steps:
2929
- name: 'Checkout repository'
30-
uses: actions/checkout@v3
30+
uses: actions/checkout@v4
3131
- name: 'Setup Node'
32-
uses: actions/setup-node@v3
32+
uses: actions/setup-node@v4
3333
with:
34-
node-version: 18
34+
node-version: 24
3535
- name: 'Install depependencies'
3636
run: |
3737
npm install

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Disallow disable rules by `eslint-disable` comment.
44

55
## Rules
66

7-
`no-eslint-disable/no-eslint-disable`
7+
`no-eslint-disable`
88

99
## Links
1010

@@ -14,4 +14,4 @@ Disallow disable rules by `eslint-disable` comment.
1414

1515
## License
1616

17-
[MIT License](https://opensource.org/licenses/MIT) (c) 2022
17+
[MIT License](https://opensource.org/licenses/MIT) (c) 2025

Taskfile

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,20 @@
22
PATH="$PWD/node_modules/.bin":$PATH
33
set -e
44

5-
build_pkgroll() {
5+
buildMicrobundle5() {
66
set -x
7-
rm -rf dist
8-
mkdir dist
9-
# https://esbuild.github.io/api/#target
10-
npx pkgroll --target=es2020
11-
cp -f README.md dist
12-
cat package.json | jq '.main = "./index.cjs"' |
13-
jq '.module = "./index.mjs"' |
14-
jq '.types = "./index.d.ts"' |
15-
jq '.exports.".".import = "./index.mjs"' |
16-
jq '.exports.".".require = "./index.cjs"' \
17-
>dist/package.json
7+
rm -rfv dist
8+
microbundle -i src/index.ts --tsconfig tsconfig.build.json --no-sourcemap --no-compress --target node -f esm -o dist
9+
name=$(cat package.json | jq -r '.name')
10+
cp -v README.md package.json dist
11+
cd dist
12+
mv index.d.ts "$name.d.ts"
13+
cat ../package.json | jq --arg name "$name" '
14+
.module = "./\($name).js" |
15+
.types = "./\($name).d.ts" |
16+
.exports.".".default = "./\($name).js"
17+
' > package.json
18+
cd ..
1819
set +x
1920
}
2021

eslint.config.mjs

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
import 'eslint-plugin-only-warn';
2+
3+
import globals from 'globals';
4+
import pluginJs from '@eslint/js';
5+
import tseslint from 'typescript-eslint';
6+
import prettier from 'eslint-plugin-prettier/recommended';
7+
import unicorn from 'eslint-plugin-unicorn';
8+
import perfectionist from 'eslint-plugin-perfectionist';
9+
10+
/** @type {import('@typescript-eslint/utils').TSESLint.FlatConfig.ConfigFile} */
11+
export default [
12+
pluginJs.configs.recommended,
13+
...tseslint.configs.recommended,
14+
...tseslint.configs.recommendedTypeChecked,
15+
prettier,
16+
{
17+
ignores: [
18+
'dist/',
19+
'coverage/',
20+
'@generated/**',
21+
'*.config.[cm]js',
22+
'.*rc.js',
23+
],
24+
languageOptions: {
25+
globals: globals.node,
26+
parserOptions: {
27+
project: ['./tsconfig.json'],
28+
warnOnUnsupportedTypeScriptVersion: false,
29+
tsconfigRootDir: import.meta.dirname,
30+
},
31+
},
32+
rules: {
33+
'max-lines': [1, { max: 300 }],
34+
'max-params': [1, { max: 5 }],
35+
'no-unneeded-ternary': [1],
36+
},
37+
},
38+
{
39+
...unicorn.configs.recommended,
40+
rules: {
41+
'unicorn/prevent-abbreviations': [
42+
'warn',
43+
{
44+
replacements: {
45+
args: false,
46+
},
47+
},
48+
],
49+
},
50+
},
51+
{
52+
plugins: {
53+
perfectionist,
54+
},
55+
rules: {
56+
'perfectionist/sort-objects': [
57+
'warn',
58+
{
59+
type: 'natural',
60+
order: 'asc',
61+
},
62+
],
63+
},
64+
},
65+
{
66+
files: ['**/*.spec.ts', '**/*.e2e-spec.ts'],
67+
rules: {
68+
'consistent-return': 0,
69+
'max-lines': 0,
70+
'@typescript-eslint/no-explicit-any': 0,
71+
'@typescript-eslint/no-floating-promises': 0,
72+
'@typescript-eslint/no-non-null-assertion': 0,
73+
'@typescript-eslint/camelcase': 0,
74+
'import/max-dependencies': 0,
75+
},
76+
},
77+
];

package.json

Lines changed: 37 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -3,84 +3,69 @@
33
"version": "0.0.0-dev",
44
"license": "MIT",
55
"description": "Disallow disable rules by `eslint-disable` comment",
6-
"keywords": [
7-
"eslintplugin",
8-
"eslint-plugin"
9-
],
10-
"main": "./dist/index.cjs",
6+
"keywords": ["eslintplugin", "eslint-plugin"],
117
"module": "./dist/index.mjs",
128
"types": "./dist/index.d.ts",
139
"exports": {
1410
".": {
15-
"import": "./dist/index.mjs",
16-
"require": "./dist/index.cjs"
11+
"default": "./dist/index.mjs"
1712
}
1813
},
1914
"scripts": {
20-
"test": "npm run eslint && npm run tscheck && npm run test:cov",
21-
"test:r": "npm run mocha -- src/**/*.spec.ts",
22-
"test:cov": "c8 --reporter text --exclude \"**/*.spec.ts\" --exclude \"**/testing/**\" npm run test:r -- --no-timeouts",
23-
"test:w": "npm run test:r -- --watch-files src --watch",
15+
"test": "npm run eslint && npm run tscheck && npm run test:r",
16+
"test:r": "vitest run",
17+
"test:cov": "vitest run --coverage",
18+
"test:w": "vitest watch",
2419
"lint": "npm run eslint && npm run tscheck",
2520
"eslint": "node node_modules/eslint/bin/eslint \"src/**/*.{ts,tsx}\"",
26-
"eslint:w": "watchexec -w src \"npm run eslint\"",
2721
"eslint:fix": "npm run eslint -- --fix",
2822
"tscheck": "tsc --noEmit",
2923
"tscheck:w": "npm run tscheck -- --watch",
30-
"lint:fix": "npm run eslint:fix && npm run lint:doc:fix",
31-
"lint:doc": "sh Taskfile remark_run",
32-
"lint:doc:fix": "sh Taskfile remark_run --output",
3324
"format:src": "prettier src --write",
34-
"commit_lint": "sh Taskfile commit_lint",
3525
"commit": "cz",
3626
"dev": "node node_modules/webpack-dev-server/bin/webpack-dev-server",
37-
"build": "sh Taskfile build_pkgroll",
27+
"build": "sh Taskfile buildMicrobundle5",
3828
"lint:w": "run-p tscheck:w eslint:w",
39-
"test:m": "node node_modules/@stryker-mutator/core/bin/stryker.js run",
40-
"mocha": "node -r ts-node/register node_modules/mocha/bin/mocha",
41-
"test:d": "ndb -r ts-node/register node_modules/mocha/bin/mocha src/**/*.spec.ts --watch-files src --no-timeouts --watch"
29+
"test:m": "node node_modules/@stryker-mutator/core/bin/stryker.js run"
4230
},
4331
"peerDependencies": {
44-
"eslint": "7 8"
32+
"eslint": "9"
4533
},
4634
"config": {},
4735
"devDependencies": {
48-
"@commitlint/cli": "17.0.3",
49-
"@commitlint/config-conventional": "17.0.3",
50-
"@semantic-release/changelog": "^6.0.1",
36+
"@commitlint/cli": "^19.8.1",
37+
"@commitlint/config-conventional": "^19.8.1",
38+
"@eslint/js": "^9.33.0",
39+
"@semantic-release/changelog": "^6.0.3",
5140
"@semantic-release/git": "^10.0.1",
52-
"@types/mocha": "^9.1.1",
53-
"@types/node": "18.6.2",
54-
"@typescript-eslint/eslint-plugin": "5.31.0",
55-
"@typescript-eslint/parser": "5.31.0",
56-
"c8": "^7.12.0",
57-
"commitizen": "^4.2.5",
58-
"conventional-changelog-conventionalcommits": "^5.0.0",
41+
"@types/node": "24.3.0",
42+
"commitizen": "^4.3.1",
43+
"conventional-changelog-conventionalcommits": "^9.1.0",
5944
"cz-conventional-changelog": "^3.3.0",
60-
"eslint": "8.20.0",
61-
"eslint-config-prettier": "8.5.0",
62-
"eslint-import-resolver-node": "^0.3.6",
63-
"eslint-plugin-etc": "^2.0.2",
64-
"eslint-plugin-import": "^2.26.0",
65-
"eslint-plugin-only-warn": "^1.0.3",
66-
"eslint-plugin-prettier": "^4.2.1",
67-
"eslint-plugin-promise": "^6.0.0",
68-
"eslint-plugin-regexp": "^1.8.0",
69-
"eslint-plugin-simple-import-sort": "^7.0.0",
70-
"eslint-plugin-unicorn": "43.0.2",
71-
"eslint-plugin-wix-editor": "^3.3.0",
72-
"expect": "^28.1.3",
45+
"eslint": "9",
46+
"eslint-config-prettier": "^10.1.8",
47+
"eslint-import-resolver-node": "^0.3.9",
48+
"eslint-plugin-import": "^2.32.0",
49+
"eslint-plugin-only-warn": "^1.1.0",
50+
"eslint-plugin-perfectionist": "^4.15.0",
51+
"eslint-plugin-prettier": "^5.5.4",
52+
"eslint-plugin-promise": "^7.2.1",
53+
"eslint-plugin-regexp": "^2.10.0",
54+
"eslint-plugin-unicorn": "^60.0.0",
55+
"expect": "^30.0.5",
7356
"git-branch-is": "^4.0.0",
74-
"mocha": "10.0.0",
57+
"globals": "^16.3.0",
58+
"microbundle": "^0.15.1",
7559
"npm-run-all": "^4.1.5",
76-
"prettier": "^2.7.1",
60+
"prettier": "^3.6.2",
7761
"request": "^2.88.2",
78-
"semantic-release": "^19.0.3",
62+
"semantic-release": "^24.2.7",
7963
"simplytyped": "^3.3.0",
80-
"ts-node": "^10.9.1",
81-
"tsconfig-paths": "^4.0.0",
82-
"tslib": "^2.4.0",
83-
"typescript": "4.7.4",
84-
"watchexec-bin": "^1.0.0"
64+
"ts-node": "^10.9.2",
65+
"tsconfig-paths": "^4.2.0",
66+
"tslib": "^2.8.1",
67+
"typescript": "^5.9.2",
68+
"typescript-eslint": "^8.39.1",
69+
"vitest": "^3.2.4"
8570
}
8671
}

prettier.config.cjs

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)