mirror of
https://github.com/microsoft/vscode-extension-samples.git
synced 2026-04-27 16:55:44 +08:00
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
48 lines
1.1 KiB
JavaScript
48 lines
1.1 KiB
JavaScript
/**
|
|
* 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',
|
|
'bin'
|
|
]
|
|
},
|
|
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/no-namespace': 'off',
|
|
'@typescript-eslint/consistent-type-definitions': 'off',
|
|
'@typescript-eslint/no-empty-object-type': 'off',
|
|
'@typescript-eslint/consistent-generic-constructors': 'off',
|
|
'@typescript-eslint/naming-convention': [
|
|
'warn',
|
|
{
|
|
'selector': 'import',
|
|
'format': ['camelCase', 'PascalCase']
|
|
}
|
|
],
|
|
'@typescript-eslint/no-unused-vars': [
|
|
'error',
|
|
{
|
|
'argsIgnorePattern': '^_'
|
|
}
|
|
]
|
|
}
|
|
}
|
|
); |