tree-sitter/lib/binding_web/eslint.config.mjs
2025-01-21 12:36:15 -05:00

27 lines
740 B
JavaScript

import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
export default tseslint.config(
eslint.configs.recommended,
tseslint.configs.recommendedTypeChecked,
tseslint.configs.strictTypeChecked,
tseslint.configs.stylisticTypeChecked,
{
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
rules: {
'no-fallthrough': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-unnecessary-condition': ['error', {
allowConstantLoopConditions: true
}],
'@typescript-eslint/restrict-template-expressions': ['error', {
allowNumber: true
}],
}
},
);