feat: eslint rule to prefer node protocols (#1187)

This commit is contained in:
Matt 2025-11-28 11:37:25 +00:00 • committed by GitHub
commit cca6ba05b5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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'
}
},
{