@dx-box/common
Version:
(DX) by providing common configurations for TypeScript, ESLint, Prettier, and automated Git hooks for formatting and linting.
29 lines (27 loc) • 926 B
JavaScript
const eslintConfig = {
root: true,
env: {
browser: true,
node: true,
es2021: true,
},
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier'],
rules: {
'no-console': 'off',
'no-debugger': 'error',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/ban-ts-comment': 'warn',
eqeqeq: ['error', 'always'],
curly: ['error', 'all'],
'no-duplicate-imports': 'error',
'no-unused-vars': ['warn', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],
'prefer-const': 'error',
'object-shorthand': ['error', 'always'],
},
};
export default eslintConfig;