Skip to content

Commit

Permalink
Merge pull request #960 from 3YOURMIND/allow-requires-in-cjs-files
Browse files Browse the repository at this point in the history
fix(eslint): allow `require` in .cjs files
  • Loading branch information
Isokaeder authored Jul 5, 2024
2 parents 8d71f32 + a20a733 commit 2dd3286
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 10 deletions.
2 changes: 1 addition & 1 deletion packages/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,5 @@
},
"type": "module",
"types": "./dist/mjs/index.d.ts",
"version": "0.0.7"
"version": "0.0.8"
}
27 changes: 18 additions & 9 deletions packages/eslint-config/source/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -409,15 +409,24 @@ export default {
*
* @deprecated
*/
untyped: tseslint.config({
name: '@3yourmind/eslint-config/untyped',
extends: [
eslint.configs.recommended,
...tseslint.configs.recommended,
...baseConfig,
],
files: ['**/*.{cjs,js,mjs}'],
}),
untyped: tseslint.config(
{
name: '@3yourmind/eslint-config/untyped',
extends: [
eslint.configs.recommended,
...tseslint.configs.recommended,
...baseConfig,
],
files: ['**/*.{cjs,js,mjs}'],
},
{
name: '@3yourmind/eslint-config/untyped-cjs',
files: ['**/*.cjs'],
rules: {
'@typescript-eslint/no-var-requires': 'off',
},
},
),
/**
* Should be used only on .vue files. Includes vue-specific rules. Works best on `<script lang="ts">`
*/
Expand Down

0 comments on commit 2dd3286

Please sign in to comment.