Skip to content

Commit

Permalink
feat(eslint): support TypeScript file extensions (#427)
Browse files Browse the repository at this point in the history
  • Loading branch information
ybiquitous authored Jun 24, 2019
1 parent a387704 commit 5a2bb23
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"test": "nyc --check-coverage --lines 100 --branches 90 tape \"test/**/*.test.js\"",
"test:watch": "nodemon --ext js,json --watch . --exec \"tape test/**/*.test.js\"",
"test:coverage": "nyc report --reporter=html",
"lint:js": "eslint --ignore-path .gitignore --ext .js,.jsx,.mjs .",
"lint:js": "eslint --ignore-path .gitignore --ext .js,.jsx,.mjs,.ts,.tsx .",
"lint:js:fix": "npm run lint:js -- --fix",
"lint:md": "remark . --frail",
"lint:md:fix": "remark . --output",
Expand All @@ -69,7 +69,7 @@
},
"lint-staged": {
"linters": {
"*.{js,jsx,mjs}": [
"*.{js,jsx,mjs,ts,tsx}": [
"eslint --fix --no-ignore",
"git add"
],
Expand Down
4 changes: 2 additions & 2 deletions test/fixtures/package-empty_expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"test": "test",
"test:watch": "test --watch",
"test:coverage": "echo \"unsupported.\" && exit 1",
"lint:js": "eslint --ignore-path .gitignore --ext .js,.jsx,.mjs .",
"lint:js": "eslint --ignore-path .gitignore --ext .js,.jsx,.mjs,.ts,.tsx .",
"lint:js:fix": "npm run lint:js -- --fix",
"lint:md": "remark . --frail",
"lint:md:fix": "remark . --output",
Expand All @@ -23,7 +23,7 @@
},
"lint-staged": {
"linters": {
"*.{js,jsx,mjs}": ["eslint --fix --no-ignore", "git add"],
"*.{js,jsx,mjs,ts,tsx}": ["eslint --fix --no-ignore", "git add"],
"*.md": ["remark --output --", "git add"],
"*.{css,html,js,json,jsx,md,mjs,scss,ts,tsx,yaml,yml}": ["prettier --write", "git add"]
},
Expand Down
4 changes: 2 additions & 2 deletions test/fixtures/package-normal_expected.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"scripts": {
"test": "abc",
"lint:js": "eslint --ignore-path .gitignore --ext .js,.jsx,.mjs .",
"lint:js": "eslint --ignore-path .gitignore --ext .js,.jsx,.mjs,.ts,.tsx .",
"test:watch": "abc --watch",
"test:coverage": "echo \"unsupported.\" && exit 1",
"lint:js:fix": "npm run lint:js -- --fix",
Expand All @@ -24,7 +24,7 @@
"lint-staged": {
"*.css": "xyz",
"linters": {
"*.{js,jsx,mjs}": ["eslint --fix --no-ignore", "git add"],
"*.{js,jsx,mjs,ts,tsx}": ["eslint --fix --no-ignore", "git add"],
"*.md": ["remark --output --", "git add"],
"*.{css,html,js,json,jsx,md,mjs,scss,ts,tsx,yaml,yml}": ["prettier --write", "git add"]
},
Expand Down

0 comments on commit 5a2bb23

Please sign in to comment.