Skip to content

Commit

Permalink
fix: Disable no-null rule on unicorn and improve disable typecheck/de…
Browse files Browse the repository at this point in the history
…v dependencies (#9)
  • Loading branch information
kingston authored Oct 12, 2024
1 parent be395ac commit 1182793
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/silent-doors-relate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@ktam/lint-node': patch
---

Disable no-null rule on unicorn and improve disable typecheck/dev dependencies
7 changes: 5 additions & 2 deletions packages/lint-node/eslint.config.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export const defaultDevDependencyGlobs = [
'**/*.test-helper.{js,ts}',
'**/*.test.{js,ts,tsx,jsx}',
'src/tests/**/*',
'**/__mocks__/**/*',
// allow dev dependencies for Storybook
'**/*.stories.{js,ts,tsx,jsx}',
// allow dev dependencies for MDX files
Expand Down Expand Up @@ -73,7 +74,7 @@ export default [
},
{
// disable type checking for js files
files: ['**/*.{js,jsx}'],
files: ['**/*.{js,jsx,cjs,mjs}'],
...tseslint.configs.disableTypeChecked,
},

Expand All @@ -96,7 +97,9 @@ export default [

// Unicorn Configs
eslintPluginUnicorn.configs['flat/recommended'],
{ rules: { 'unicorn/prevent-abbreviations': 'off' } },
{
rules: { 'unicorn/prevent-abbreviations': 'off', 'unicorn/no-null': 'off' },
},

// Perfectionist Configs
{
Expand Down
3 changes: 1 addition & 2 deletions packages/tools-sample-project/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
"extends": "@tsconfig/node20/tsconfig.json",
"compilerOptions": {
"outDir": "dist",
"baseUrl": ".",
"paths": {
"@src/*": ["src/*"]
"@src/*": ["./src/*"]
}
},
"include": ["src/**/*.ts"]
Expand Down

0 comments on commit 1182793

Please sign in to comment.