Skip to content
This repository was archived by the owner on May 18, 2022. It is now read-only.

Commit 2fa585a

Browse files
authored
chore: Replace tslint with eslint (#4)
- Remove tslint and its configurations - Add eslint and set default configurations Palantir [announced][1] that it will deprecate TSLint in favour of typescript-eslint. The TypeScript team [announced][2] that themselves will start using typescript-eslint instead of tslint. [1]: https://medium.com/palantir/tslint-in-2019-1a144c2317a9 [2]: microsoft/TypeScript#30553
1 parent 52b6654 commit 2fa585a

File tree

10 files changed

+472
-2600
lines changed

10 files changed

+472
-2600
lines changed

.eslintrc.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
module.exports = {
2+
env: {
3+
browser: true,
4+
es6: true,
5+
node: true,
6+
},
7+
extends: [
8+
'eslint:recommended',
9+
'plugin:react/recommended',
10+
'plugin:@typescript-eslint/eslint-recommended',
11+
'plugin:@typescript-eslint/recommended',
12+
'plugin:@typescript-eslint/recommended-requiring-type-checking',
13+
'prettier',
14+
'prettier/react',
15+
'prettier/@typescript-eslint',
16+
],
17+
globals: {
18+
Atomics: 'readonly',
19+
SharedArrayBuffer: 'readonly',
20+
},
21+
parser: '@typescript-eslint/parser',
22+
parserOptions: {
23+
project: './tsconfig.json',
24+
},
25+
rules: {},
26+
};
File renamed without changes.

gatsby-config.js

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,18 @@ module.exports = {
1515
},
1616
`gatsby-transformer-sharp`,
1717
`gatsby-plugin-sharp`,
18-
`gatsby-plugin-typescript`,
19-
`gatsby-plugin-tslint`,
18+
`gatsby-plugin-typescript`,
19+
{
20+
resolve: `gatsby-plugin-eslint`,
21+
options: {
22+
test: /\.(js|ts)x?$/,
23+
exclude: /(node_modules|.cache|public)/,
24+
options: {
25+
emitWarning: true,
26+
failOnError: false,
27+
},
28+
},
29+
},
2030
{
2131
resolve: `gatsby-plugin-manifest`,
2232
options: {
@@ -33,4 +43,4 @@ module.exports = {
3343
// To learn more, visit: https://gatsby.dev/offline
3444
// `gatsby-plugin-offline`,
3545
],
36-
}
46+
};
File renamed without changes.

0 commit comments

Comments
 (0)