mirror of
https://github.com/microsoft/vscode-extension-samples.git
synced 2026-04-27 16:55:44 +08:00
Migrate all samples to eslint 9
Switches all samples to use eslint 9 with flat configs. I've tried to migrate existing settings as much as possible. However our eslint configs were also inconsistent so I've tried to align these too
This commit is contained in:
@ -1,20 +0,0 @@
|
||||
/**@type {import('eslint').Linter.Config} */
|
||||
// eslint-disable-next-line no-undef
|
||||
module.exports = {
|
||||
root: true,
|
||||
parser: '@typescript-eslint/parser',
|
||||
plugins: [
|
||||
'@typescript-eslint',
|
||||
],
|
||||
extends: [
|
||||
'eslint:recommended',
|
||||
'plugin:@typescript-eslint/recommended',
|
||||
],
|
||||
rules: {
|
||||
'semi': [2, "always"],
|
||||
'@typescript-eslint/no-unused-vars': 0,
|
||||
'@typescript-eslint/no-explicit-any': 0,
|
||||
'@typescript-eslint/explicit-module-boundary-types': 0,
|
||||
'@typescript-eslint/no-non-null-assertion': 0,
|
||||
}
|
||||
};
|
||||
44
webpack-sample/eslint.config.mjs
Normal file
44
webpack-sample/eslint.config.mjs
Normal file
@ -0,0 +1,44 @@
|
||||
/**
|
||||
* ESLint configuration for the project.
|
||||
*
|
||||
* See https://eslint.style and https://typescript-eslint.io for additional linting options.
|
||||
*/
|
||||
// @ts-check
|
||||
import js from '@eslint/js';
|
||||
import tseslint from 'typescript-eslint';
|
||||
import stylistic from '@stylistic/eslint-plugin';
|
||||
|
||||
export default tseslint.config(
|
||||
{
|
||||
ignores: [
|
||||
'out',
|
||||
'webpack.config.js'
|
||||
]
|
||||
},
|
||||
js.configs.recommended,
|
||||
...tseslint.configs.recommended,
|
||||
...tseslint.configs.stylistic,
|
||||
{
|
||||
plugins: {
|
||||
'@stylistic': stylistic
|
||||
},
|
||||
rules: {
|
||||
'curly': 'warn',
|
||||
'@stylistic/semi': ['warn', 'always'],
|
||||
'@typescript-eslint/no-empty-function': 'off',
|
||||
'@typescript-eslint/naming-convention': [
|
||||
'warn',
|
||||
{
|
||||
'selector': 'import',
|
||||
'format': ['camelCase', 'PascalCase']
|
||||
}
|
||||
],
|
||||
'@typescript-eslint/no-unused-vars': [
|
||||
'error',
|
||||
{
|
||||
'argsIgnorePattern': '^_'
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
);
|
||||
1621
webpack-sample/package-lock.json
generated
1621
webpack-sample/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -31,16 +31,17 @@
|
||||
"webpack": "webpack --mode development",
|
||||
"webpack-dev": "webpack --mode development --watch",
|
||||
"test-compile": "tsc -p ./",
|
||||
"lint": "eslint \"src/**/*.ts\""
|
||||
"lint": "eslint"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.13.0",
|
||||
"@stylistic/eslint-plugin": "^2.9.0",
|
||||
"@types/node": "^20",
|
||||
"@types/vscode": "^1.73.0",
|
||||
"@typescript-eslint/eslint-plugin": "^7.14.0",
|
||||
"@typescript-eslint/parser": "^7.14.0",
|
||||
"eslint": "^8.26.0",
|
||||
"eslint": "^9.13.0",
|
||||
"ts-loader": "^7.0.5",
|
||||
"typescript": "^5.6.2",
|
||||
"typescript-eslint": "^8.11.0",
|
||||
"webpack": "^5.75.0",
|
||||
"webpack-cli": "^5.0.1"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user