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
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,6 @@ jobs:
run: npm run check:circular-dependencies -w packages/core
- name: Ensure no lint errors
run: npm run lint
# See https://github.com/arethetypeswrong/arethetypeswrong.github.io/tree/main/packages/cli
- name: Check npm package
run: npm run check:npm-package -w packages/core
11 changes: 11 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ limitations under the License.

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 tsEslint from 'typescript-eslint';

Expand Down Expand Up @@ -89,5 +90,15 @@ export default tsEslint.config(
},
},

{
files: ['packages/core/src/**/*'],
...nodePlugin.configs['flat/recommended-script'],
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"
},
},

prettierRecommendedConfig // Enables eslint-plugin-prettier, eslint-config-prettier and prettier/prettier. This will display prettier errors as ESLint errors. Make sure this is always the last configuration.
);
Loading