Skip to content

Commit e886025

Browse files
committed
update eslint
1 parent b22bfa4 commit e886025

18 files changed

+223
-309
lines changed

.eslintignore

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

.eslintrc.js

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

bin/commands/default.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ module.exports.handler = async function handler(argv) {
4747
// since we are piping, not inheriting, the child process
4848
// doesn't have the power to close its parent
4949
if (ps) {
50-
// eslint-disable-next-line no-process-exit
5150
process.exit();
5251
}
5352
} catch (err) {

bin/commands/init.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ module.exports.handler = async function handler(argv) {
3737
// since we are piping, not inheriting, the child process
3838
// doesn't have the power to close its parent
3939
if (ps) {
40-
// eslint-disable-next-line no-process-exit
4140
process.exit();
4241
}
4342
} catch (err) {

bin/commands/reset.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ module.exports.handler = async function handler(argv) {
3232
// since we are piping, not inheriting, the child process
3333
// doesn't have the power to close its parent
3434
if (ps) {
35-
// eslint-disable-next-line no-process-exit
3635
process.exit();
3736
}
3837
} catch (err) {

eslint.config.mjs

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import js from '@eslint/js';
2+
import globals from 'globals';
3+
import { defineConfig } from 'eslint/config';
4+
5+
import eslintConfigPrettier from 'eslint-config-prettier/flat';
6+
import mochaPlugin from 'eslint-plugin-mocha';
7+
8+
export default defineConfig([
9+
{
10+
files: ['**/*.{js,mjs,cjs}'],
11+
plugins: { js },
12+
extends: ['js/recommended'],
13+
languageOptions: { globals: globals.node }
14+
},
15+
{ files: ['**/*.js'], languageOptions: { sourceType: 'commonjs' } },
16+
eslintConfigPrettier,
17+
mochaPlugin.configs.recommended,
18+
{
19+
rules: {
20+
// this is here because of the strange mocha-helpers helpers package. TODO remove mocha-helpers
21+
'mocha/no-top-level-hooks': 'off',
22+
'mocha/no-sibling-hooks': 'off',
23+
'mocha/consistent-spacing-between-blocks': 'off'
24+
}
25+
},
26+
{
27+
ignores: ['test/fixtures']
28+
}
29+
]);

package.json

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
"src"
2727
],
2828
"scripts": {
29-
"lint": "eslint . --ext js,json && prettier --check .",
30-
"lint:fix": "eslint . --ext js,json --fix && prettier --write .",
29+
"lint": "eslint . && prettier --check .",
30+
"lint:fix": "eslint . --fix && prettier --write .",
3131
"start": "node bin/ember-cli-update",
3232
"test": "mocha",
3333
"test:bin": "mocha --config .mocharc.bin.js",
@@ -36,10 +36,12 @@
3636
"version": "git add README.md"
3737
},
3838
"dependencies": {
39+
"@eslint/js": "^9.35.0",
3940
"boilerplate-update": "^2.1.1",
4041
"debug": "^4.2.0",
4142
"execa": "^5.0.0",
4243
"fs-extra": "^10.0.0",
44+
"globals": "^16.4.0",
4345
"inquirer": "^8.0.0",
4446
"pacote": "^13.6.0",
4547
"resolve": "^1.10.0",
@@ -56,12 +58,9 @@
5658
"chai-fs": "^2.0.0",
5759
"chai-string": "^1.5.0",
5860
"ember-cli": "3.16.0",
59-
"eslint": "^8.16.0",
61+
"eslint": "^9.35.0",
6062
"eslint-config-prettier": "^10.1.8",
61-
"eslint-config-sane": "^1.0.2",
62-
"eslint-config-sane-node": "^1.1.1",
63-
"eslint-plugin-json-files": "^1.3.0",
64-
"eslint-plugin-mocha": "^10.0.4",
63+
"eslint-plugin-mocha": "^11.1.0",
6564
"eslint-plugin-node": "^11.1.0",
6665
"eslint-plugin-prefer-let": "^3.0.1",
6766
"git-diff-apply": "^3.0.0",

0 commit comments

Comments
 (0)