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
8 changes: 8 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import eslintJs from '@eslint/js';
import importPlugin from 'eslint-plugin-import';
import nodePlugin from 'eslint-plugin-n';
import prettierRecommendedConfig from 'eslint-plugin-prettier/recommended';
import unicornPlugin from 'eslint-plugin-unicorn';
import tsEslint from 'typescript-eslint';

export default tsEslint.config(
Expand Down Expand Up @@ -93,10 +94,17 @@ export default tsEslint.config(
{
files: ['packages/core/src/**/*'],
...nodePlugin.configs['flat/recommended-script'],
plugins: {
n: nodePlugin,
unicorn: unicornPlugin,
},
rules: {
...nodePlugin.configs['flat/recommended-script'].rules, // without this line, the rules are not applied when specifying custom rules
'n/file-extension-in-import': ['error', 'always'],
'n/no-unsupported-features/node-builtins': 'off', // we don't use node in this package, and most errors are due to "navigator.xxx is still an experimental feature and is not supported until Node.js yyy"
// apply a subset of unicorn rules for now
'unicorn/prefer-number-properties': 'error',
'unicorn/prefer-switch': 'error',
},
},

Expand Down
Loading