Skip to content

Commit

Permalink
Merge branch 'release/3.1.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
matthew-holder-revvity committed Aug 3, 2024
2 parents c3620ae + 260eb1a commit e40bbd4
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sixxgate/lint",
"version": "3.1.1",
"version": "3.1.2",
"packageManager": "[email protected]",
"main": "dist/index.cjs",
"author": "Matthew Holder <[email protected]>",
Expand Down
9 changes: 9 additions & 0 deletions src/components/node.cts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,15 @@ const NodeComponent = defineComponent('node', ({ getComponent }) => {
...getStandardNodeRules()
}

config.overrides = config.overrides ?? []
config.overrides.push({
files: ['**/.eslintrc.*'],
rules: {
// ESLint will use unpublished modules.
'n/no-unpublished-require': 'off'
}
})

return config
}

Expand Down
25 changes: 18 additions & 7 deletions src/components/typescript.cts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ function getStandardTypeScriptRules(): Linter.RulesRecord {
// Causes too many issues with callback parameters,
// so this will be a rare diviation from strict.
'@typescript-eslint/unified-signatures': 'off',
// Prevents really common usecases for generics.
'@typescript-eslint/no-unnecessary-type-parameters': 'off',
// Handled by and conflicts with prettier.
'@typescript-eslint/no-extra-semi': 'off'
}
Expand Down Expand Up @@ -131,14 +133,23 @@ const TypeScriptComponent = Object.assign(
}

config.overrides = config.overrides ?? []
config.overrides.push({
files: ['**/*.js', '**/*.cjs', '**/*.mjs', '**/*.jsx'],
extends: ['plugin:@typescript-eslint/disable-type-checked'],
rules: {
// This is transpiled by TypeScript and not support in JavaScript.
'@typescript-eslint/no-var-requires': 'off'
config.overrides.push(
{
files: ['**/*.js', '**/*.cjs', '**/*.mjs', '**/*.jsx'],
extends: ['plugin:@typescript-eslint/disable-type-checked'],
rules: {
// This is transpiled by TypeScript and not support in JavaScript.
'@typescript-eslint/no-var-requires': 'off'
}
},
{
files: ['**/*.cjs', '**/*.cts'],
rules: {
// CommonJS modules should not be barred from this.
'@typescript-eslint/no-require-imports': 'off'
}
}
})
)

return config
}
Expand Down

0 comments on commit e40bbd4

Please sign in to comment.