|
|
|
const js = require('@eslint/js'); |
|
const ts = require('@typescript-eslint/eslint-plugin'); |
|
const tsParser = require('@typescript-eslint/parser'); |
|
const prettier = require('eslint-plugin-prettier'); |
|
|
|
module.exports = [ |
|
js.configs.recommended, |
|
{ |
|
files: ['**/*.ts', '**/*.js'], |
|
languageOptions: { |
|
parser: tsParser, |
|
ecmaVersion: 'latest', |
|
sourceType: 'script', |
|
globals: { |
|
require: 'readonly', |
|
module: 'readonly', |
|
__dirname: 'readonly', |
|
process: 'readonly', |
|
}, |
|
}, |
|
plugins: { |
|
'@typescript-eslint': ts, |
|
prettier, |
|
}, |
|
rules: { |
|
'prettier/prettier': 'warn', |
|
'no-unused-vars': 'warn', |
|
'@typescript-eslint/no-unused-vars': 'warn', |
|
'no-empty': 'off', |
|
'no-undef': 'off', |
|
}, |
|
}, |
|
]; |
|
|