Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions .eslintrc.json

This file was deleted.

1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ jobs:

- name: Lint TypeScript
run: yarn lint
continue-on-error: true

- name: Compile TypeScript
run: yarn compile
Expand Down
2 changes: 1 addition & 1 deletion .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ src/**
tsconfig.json
**/*.map
**/*.ts
.eslintrc.json
eslint.config.mjs
assets/icon-font-src/**
.fantasticonrc.js
fonts/*.json
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,13 @@ All notable changes to the "comline-vscode" extension will be documented in this
`CHANGELOG.md`), and writes the `Comline Package` language alias as the
Marketplace tag `ComlinePackage`. It also takes the development-only advisories
held by vsce's old `markdown-it`, `linkify-it` and `uuid` with it.
- Linting moves to ESLint 10 with typescript-eslint 8. The configuration is now
the flat `eslint.config.mjs` (`.eslintrc.json` is gone) with the same rules as
before: `@typescript-eslint/naming-convention`, `curly`, `eqeqeq` and
`no-throw-literal`, all warnings. `@typescript-eslint/semi`, removed in
typescript-eslint 8, is `@stylistic/semi`. `yarn lint` is `eslint src`.
CI's lint step no longer ignores a failure: an error fails the job (the 24
existing naming-convention warnings do not).

### Fixed
- The extension is bundled (esbuild) into one file, `dist/extension.js`, and the
Expand Down
31 changes: 31 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Flat config. It is .eslintrc.json translated rule for rule (no `extends`,
// so only the rules named here run), with `@typescript-eslint/semi`, which
// typescript-eslint 8 removed, replaced by `@stylistic/semi`.
import { defineConfig, globalIgnores } from 'eslint/config';
import tsPlugin from '@typescript-eslint/eslint-plugin';
import tsParser from '@typescript-eslint/parser';
import stylistic from '@stylistic/eslint-plugin';

export default defineConfig([
// node_modules is ignored by default.
globalIgnores(['out/**', '.vscode-test/**']),
{
files: ['**/*.ts'],
languageOptions: {
parser: tsParser,
ecmaVersion: 6,
sourceType: 'module',
},
plugins: {
'@typescript-eslint': tsPlugin,
'@stylistic': stylistic,
},
rules: {
'@typescript-eslint/naming-convention': 'warn',
'@stylistic/semi': 'warn',
curly: 'warn',
eqeqeq: 'warn',
'no-throw-literal': 'warn',
},
},
]);
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -274,19 +274,20 @@
"watch": "tsc -watch -p ./",
"pretest": "yarn compile",
"test": "node --test out/resolve.test.js out/coreRev.test.js out/idpSchema.test.js",
"lint": "eslint src --ext ts",
"lint": "eslint src",
"package": "bash scripts/package.sh",
"link-binary": "bash scripts/link-binary.sh",
"build:icon-font": "npx --yes fantasticon@^4.1.0"
},
"devDependencies": {
"@stylistic/eslint-plugin": "^6.0.0",
"@types/node": "^18.0.0",
"@types/vscode": "^1.75.0",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"@typescript-eslint/eslint-plugin": "^8.72.2",
"@typescript-eslint/parser": "^8.72.2",
"@vscode/vsce": "^4.1.1",
"esbuild": "0.28.2",
"eslint": "^8.0.0",
"eslint": "^10.15.0",
"typescript": "^5.0.0"
},
"dependencies": {
Expand Down
Loading
Loading