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

Commit

Permalink
chore: Replace tslint with eslint (#4)
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
Couto authored Aug 28, 2019
1 parent 52b6654 commit 2fa585a
Show file tree
Hide file tree
Showing 10 changed files with 472 additions and 2,600 deletions.
26 changes: 26 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
module.exports = {
env: {
browser: true,
es6: true,
node: true,
},
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'prettier',
'prettier/react',
'prettier/@typescript-eslint',
],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
},
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json',
},
rules: {},
};
File renamed without changes.
16 changes: 13 additions & 3 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,18 @@ module.exports = {
},
`gatsby-transformer-sharp`,
`gatsby-plugin-sharp`,
`gatsby-plugin-typescript`,
`gatsby-plugin-tslint`,
`gatsby-plugin-typescript`,
{
resolve: `gatsby-plugin-eslint`,
options: {
test: /\.(js|ts)x?$/,
exclude: /(node_modules|.cache|public)/,
options: {
emitWarning: true,
failOnError: false,
},
},
},
{
resolve: `gatsby-plugin-manifest`,
options: {
Expand All @@ -33,4 +43,4 @@ module.exports = {
// To learn more, visit: https://gatsby.dev/offline
// `gatsby-plugin-offline`,
],
}
};
File renamed without changes.
Loading

0 comments on commit 2fa585a

Please sign in to comment.