Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ examples
jsdoc_conf.json
test
tsconfig.json
tsconfig.build.json
34 changes: 31 additions & 3 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,29 @@
// @ts-check

import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
import globals from 'globals';

export default [
export default tseslint.config(
eslint.configs.recommended,
{
// Linting rules for TS files, should be combined with the base config when migration is complete
files: ['**/*.{ts,tsx}'],
extends: [
...tseslint.configs.strictTypeChecked,
...tseslint.configs.stylisticTypeChecked,
],
languageOptions: {
parser: tseslint.parser,
parserOptions: {
projectService: true,
},
}
},
{
languageOptions: {
'globals': {
...globals.es2020,
...globals.browser,
...globals.node,
'bson': true
Expand All @@ -18,6 +38,14 @@ export default [
{
ignores: ['dist']
},
{
// FIXME: Recommended rules that have been turned off to maintain compatibility with the current codebase
rules: {
'no-useless-escape': 0,
'no-unused-vars': 0,
'no-prototype-builtins': 0,
}
},
{
rules: {
curly: 2,
Expand All @@ -35,6 +63,6 @@ export default [
'linebreak-style': 2,
'key-spacing': [2, {afterColon: true}]
},
files: ['**/*.{js,jsx,cjs}']
files: ['**/*.{js,jsx,ts,tsx,cjs}'],
}
];
);
Loading