Skip to content

Commit

Permalink
chore: Upgrade to ESLint 9 (#3177)
Browse files Browse the repository at this point in the history
  • Loading branch information
nschonni committed May 21, 2024
1 parent 0402699 commit f4b3cb5
Show file tree
Hide file tree
Showing 12 changed files with 92 additions and 170 deletions.
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

12 changes: 0 additions & 12 deletions .eslintrc.json

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ name: Lint
on:
pull_request:
paths:
- '.eslint*'
- .prettier*"
- '**/*.js'
- '**/*.mjs'
- '**/*.md'
- '**/*.json'
- '**/*.yml'
- '**/*.yaml'
push:
paths:
- '.eslint*'
- .prettier*"
- '**/*.js'
- '**/*.mjs'
- '**/*.md'
- '**/*.json'
- '**/*.yml'
Expand Down
2 changes: 1 addition & 1 deletion cspell-dict-file-checker/check.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function formatResult(result) {
(seg) =>
`${seg.flagIE} ${seg.isError ? '!' : '_'} ${rightJustify(seg.startPos)}-${rightJustify(seg.endPos)} | ${
seg.text
}`
}`,
);
}

Expand Down
6 changes: 2 additions & 4 deletions dictionaries/java/test/verify.test.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { checkSnapshots } from 'cspell-dict-file-checker/index.mjs'
import { checkSnapshots } from 'cspell-dict-file-checker/index.mjs';

const testFiles = [
'samples/**/*.java',
];
const testFiles = ['samples/**/*.java'];

checkSnapshots(testFiles);
7 changes: 2 additions & 5 deletions dictionaries/latex/test/verify.test.mjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import { checkSnapshots } from 'cspell-dict-file-checker/index.mjs'
import { checkSnapshots } from 'cspell-dict-file-checker/index.mjs';

const testFiles = [
'samples/issue-1097.tex',
'samples/papers/**/*.tex',
];
const testFiles = ['samples/issue-1097.tex', 'samples/papers/**/*.tex'];

checkSnapshots(testFiles);
6 changes: 2 additions & 4 deletions dictionaries/markdown/test/verify.test.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { checkSnapshots } from 'cspell-dict-file-checker/index.mjs'
import { checkSnapshots } from 'cspell-dict-file-checker/index.mjs';

const testFiles = [
'samples/**/*.md',
];
const testFiles = ['samples/**/*.md'];

checkSnapshots(testFiles);
24 changes: 24 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import js from '@eslint/js';
import globals from 'globals';

export default [
js.configs.recommended,
{
languageOptions: {
parserOptions: {
sourceType: 'module',
},
globals: {
...globals.node,
},
},
},
{
files: ['**/__tests__/**'],
languageOptions: {
globals: {
...globals.jest,
},
},
},
];
1 change: 0 additions & 1 deletion generator-cspell-dicts/__tests__/app.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-env jest */
'use strict';
var path = require('path');
var assert = require('yeoman-assert');
Expand Down
9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"scripts": {
"test": "pnpm -r run --workspace-concurrency 2 --stream test",
"lint": "pnpm run lint:fix && cspell --no-progress",
"lint-ci": "eslint . && prettier -c \"**/*.{md,json,yml,yaml}\" && cspell --no-progress",
"lint:fix": "eslint --fix . && prettier -w \"**/*.{md,json,yml,yaml}\"",
"lint-ci": "eslint . && prettier -c . && cspell --no-progress",
"lint:fix": "eslint --fix . && prettier -w .",
"build:all": "pnpm -r run --stream --workspace-concurrency 2 build --no-bail",
"build:readme": "pnpm run readme:generate-doc-dictionaries && pnpm run readme:inject",
"build:conditional": "pnpm -r run --workspace-concurrency 2 --stream build:conditional --no-bail && pnpm -r run --workspace-concurrency 2 --stream conditional-build --no-bail",
Expand Down Expand Up @@ -40,10 +40,9 @@
"cross-env": "^7.0.3",
"cspell": "^8.8.1",
"cspell-dict-file-checker": "workspace:*",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint": "^9.3.0",
"generator-cspell-dicts": "workspace:*",
"globals": "^15.3.0",
"hunspell-reader": "^8.8.1",
"inject-markdown": "^3.0.0",
"json5": "2.2.3",
Expand Down
Loading

0 comments on commit f4b3cb5

Please sign in to comment.