Skip to content

Commit

Permalink
Split out TypeScript configuration to separate file.
Browse files Browse the repository at this point in the history
In #10, the typescript-eslint plugin and its recommended ruleset was
added, but this inadvertently also covered .js files, and caused
problems when used with codebases containing mixed JS/TS files.

To avoid this issue, we define another extendable ruleset
@glints/eslint-config/typescript. Projects that want to apply this
ruleset to just TypeScript files can define "overrides": ["**/*.ts",
...].
  • Loading branch information
yjwong committed Apr 9, 2022
1 parent 6e30bad commit baf16be
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 0 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
module.exports = {
parser: '@typescript-eslint/parser',
plugins: [
'@typescript-eslint',
],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
],
rules: {
'strict': [2, 'never'],
Expand Down
5 changes: 5 additions & 0 deletions typescript.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
extends: ['plugin:@typescript-eslint/recommended'],
};

0 comments on commit baf16be

Please sign in to comment.