Skip to content

Commit

Permalink
Fix 'no-undef' rule for js files in TypeScript Language Server
Browse files Browse the repository at this point in the history
  • Loading branch information
ryota-murakami committed Oct 25, 2023
1 parent 8bfe179 commit 446f2b4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ module.exports = {
node: true,
},
extends: [],
// This overrides apply 'no-undef' rule only js files because in TypeScript Language Server catch and show error against undefined variable name.
overrides: [
{
files: [
Expand All @@ -17,7 +18,7 @@ module.exports = {
'**/*.mjs',
],
rules: {
'no-undef': 'error',
'no-undef': ['error', { typeof: false }],
},
},
],
Expand Down Expand Up @@ -108,6 +109,7 @@ module.exports = {
},
},
],
// Prevent unexpected parseInt() output that does not return the number calculated in decimal when given a value such as parseInt(071).
radix: 'error',
'require-atomic-updates': ['error', { allowProperties: true }],
'sort-keys-custom-order/object-keys': [
Expand Down

0 comments on commit 446f2b4

Please sign in to comment.