-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.js
25 lines (24 loc) · 1.05 KB
/
eslint.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
const typescriptEslintParser = require('@typescript-eslint/parser');
const typescriptEslintPlugin = require('@typescript-eslint/eslint-plugin');
module.exports = [
{
ignores: ['node_modules', 'main.js'], // Ignoring the default generated files and directories
},
{
files: ['**/*.ts'], // Apply the configuration to TypeScript files
languageOptions: {
parser: typescriptEslintParser,
ecmaVersion: 'latest', // Always using the latest ECMAScript version
sourceType: 'module', // Modern JavaScript uses module import/export syntax
},
plugins: {
'@typescript-eslint': typescriptEslintPlugin, // Using TypeScript-specific plugin
},
rules: {
'@typescript-eslint/no-unused-vars': ['error', { args: 'none' }], // Replacing 'no-unused-vars' with TS-specific version
'@typescript-eslint/ban-ts-comment': 'off', // Allowing use of ts comments if needed
'@typescript-eslint/no-empty-function': 'off', // Allowing empty functions for flexibility
'no-prototype-builtins': 'off', // Allowing direct calls to object's prototype functions
},
},
];