feat: eslint rule to prefer node protocols (#1187)
This commit is contained in:
parent
ec33e3f506
commit
cca6ba05b5
1 changed files with 195 additions and 21 deletions
|
|
@ -3,6 +3,7 @@
|
|||
import eslint from '@eslint/js';
|
||||
import tseslint from 'typescript-eslint';
|
||||
import eslintConfigPrettier from 'eslint-config-prettier/flat';
|
||||
import nodePlugin from 'eslint-plugin-n';
|
||||
|
||||
export default tseslint.config(
|
||||
eslint.configs.recommended,
|
||||
|
|
@ -11,8 +12,12 @@ export default tseslint.config(
|
|||
linterOptions: {
|
||||
reportUnusedDisableDirectives: false
|
||||
},
|
||||
plugins: {
|
||||
n: nodePlugin
|
||||
},
|
||||
rules: {
|
||||
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }]
|
||||
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
|
||||
'n/prefer-node-protocol': 'error'
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue