eslint-config-decent
v2.2.2
Published
A decent ESLint configuration
Downloads
508
Readme
eslint-config-decent
A decent ESLint configuration for TypeScript projects.
Example usage
// eslint.config.mjs
import { config } from 'eslint-config-decent';
export default config({
tsconfigRootDir: import.meta.dirname,
});
Override parserOptions
// eslint.config.mjs
import { config } from 'eslint-config-decent';
export default config({
parserOptions: {
projectService: {
defaultProject: 'tsconfig.json',
},
tsconfigRootDir: import.meta.dirname,
},
});
Disable require-extensions rules
// eslint.config.mjs
import { config } from 'eslint-config-decent';
export default config({
enableRequireExtensions: false,
tsconfigRootDir: import.meta.dirname,
});
Override a rule
// eslint.config.mjs
import { config } from 'eslint-config-decent';
export default [
...config({
tsconfigRootDir: import.meta.dirname,
}),
{
files: ['**/*.ts'],
rules: {
'@typescript-eslint/no-confusing-void-expression': 'off',
},
},
];
Use typescript-eslint config
// eslint.config.mjs
import { tsEslintConfig } from 'eslint-config-decent';
import tsEslint from 'typescript-eslint';
export default tsEslint(
...tsEslintConfig({
tsconfigRootDir: import.meta.dirname,
}),
);
License
MIT