Skip to content

Commit 8699702

Browse files
committed
move to explicit eslint
1 parent c845c87 commit 8699702

14 files changed

Lines changed: 726 additions & 4764 deletions

.eslintrc.js

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

.github/workflows/ci.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,22 @@ concurrency:
1212
cancel-in-progress: true
1313

1414
jobs:
15+
lint:
16+
name: Tests
17+
runs-on: ${{ matrix.os }}
18+
timeout-minutes: 5
19+
20+
steps:
21+
- uses: actions/checkout@v7
22+
- uses: pnpm/action-setup@v6
23+
- uses: actions/setup-node@v7
24+
with:
25+
node-version: 26
26+
cache: pnpm
27+
- run: pnpm install
28+
- run: pnpm lint
29+
30+
1531
test:
1632
name: Tests
1733
runs-on: ${{ matrix.os }}
@@ -27,7 +43,7 @@ jobs:
2743
os:
2844
- ubuntu-latest
2945
- macOS-latest
30-
- windows-latest]
46+
- windows-latest
3147

3248
steps:
3349
- uses: actions/checkout@v7

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
node_modules
2+
.eslintcache

.prettierignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# unconventional js
2+
/blueprints/*/files/
3+
4+
# compiled output
5+
/dist/
6+
7+
# misc
8+
/coverage/
9+
!.*
10+
.*/
11+
/pnpm-lock.yaml
12+
ember-cli-update.json
13+
*.html
14+
CHANGELOG.md

eslint.config.mjs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import js from "@eslint/js";
2+
import globals from "globals";
3+
import { defineConfig } from "eslint/config";
4+
import eslintConfigPrettier from "eslint-config-prettier/flat";
5+
6+
export default defineConfig([
7+
{ files: ["**/*.{js,mjs,cjs}"], plugins: { js }, extends: ["js/recommended"], languageOptions: { globals: globals.node } },
8+
{ files: ["./tests/**/*.{js,mjs,cjs}"], languageOptions: { globals: globals.mocha }},
9+
{ files: ["**/*.js"], languageOptions: { sourceType: "commonjs" } },
10+
eslintConfigPrettier,
11+
]);

package.json

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@
2323
"scripts": {
2424
"changelog": "lerna-changelog",
2525
"test": "mocha tests/*-tests.js",
26+
"format": "prettier . --cache --write",
27+
"lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\" --prefixColors auto",
28+
"lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\" --prefixColors auto && npm run format",
29+
"lint:format": "prettier . --cache --check",
30+
"lint:js": "eslint . --cache",
31+
"lint:js:fix": "eslint . --fix",
2632
"test:debug": "mocha debug tests/*-tests.js"
2733
},
2834
"prettier": {
@@ -35,19 +41,18 @@
3541
"silent-error": "^1.1.1"
3642
},
3743
"devDependencies": {
38-
"eslint-config-prettier": "^6.15.0",
39-
"eslint-plugin-prettier": "^3.4.0",
44+
"@eslint/js": "^10.0.1",
45+
"concurrently": "^10.0.3",
46+
"eslint": "^10.7.0",
47+
"eslint-config-prettier": "^10.1.8",
4048
"fixturify": "^2.1.1",
4149
"fixturify-project": "^2.1.1",
42-
"lerna-changelog": "^1.0.1",
43-
"mocha": "^8.4.0",
44-
"mocha-eslint": "^6.0.0",
45-
"prettier": "^1.19.1",
46-
"release-it": "^14.10.1",
47-
"release-it-lerna-changelog": "^3.1.0"
50+
"globals": "^17.7.0",
51+
"mocha": "^11.7.6",
52+
"prettier": "^3.9.5"
4853
},
4954
"engines": {
50-
"node": "10.* || >= 12.*"
55+
"node": "22.* || 24.* || >= 26.*"
5156
},
5257
"publishConfig": {
5358
"registry": "https://registry.npmjs.org"

0 commit comments

Comments
 (0)