mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-19 18:27:29 -05:00
40 lines
1.3 KiB
JavaScript
40 lines
1.3 KiB
JavaScript
module.exports = {
|
|
parser: '@typescript-eslint/parser',
|
|
extends: [
|
|
'eslint:recommended',
|
|
'plugin:@typescript-eslint/recommended',
|
|
'plugin:@typescript-eslint/recommended-requiring-type-checking',
|
|
],
|
|
parserOptions: {
|
|
ecmaVersion: 2020,
|
|
sourceType: 'module',
|
|
tsconfigRootDir: __dirname,
|
|
project: ['./tsconfig.json'],
|
|
},
|
|
env: {
|
|
es6: true,
|
|
browser: true,
|
|
},
|
|
plugins: ['@typescript-eslint'],
|
|
ignorePatterns: ['node_modules'],
|
|
rules: {
|
|
// ts-ignore is already an explicit override, no need to have a second lint
|
|
'@typescript-eslint/ban-ts-comment': 'off',
|
|
|
|
// any related lints
|
|
'@typescript-eslint/no-explicit-any': 'error',
|
|
'@typescript-eslint/no-unsafe-assignment': 'error',
|
|
'@typescript-eslint/no-unsafe-call': 'error',
|
|
'@typescript-eslint/no-unsafe-member-access': 'error',
|
|
'@typescript-eslint/no-unsafe-argument': 'error',
|
|
'@typescript-eslint/no-unsafe-return': 'error',
|
|
|
|
// other rules
|
|
'no-prototype-builtins': 'error',
|
|
'@typescript-eslint/no-unused-vars': ['error', { args: 'none' }],
|
|
'@typescript-eslint/no-floating-promises': 'error',
|
|
'@typescript-eslint/restrict-plus-operands': 'error',
|
|
'@typescript-eslint/no-empty-function': 'error',
|
|
},
|
|
};
|