Skip to content

Commit 92ad3a9

Browse files
nschonnibenhalverson
authored andcommitted
chore: bump ESLint and Prettier
1 parent fd3e9bd commit 92ad3a9

15 files changed

+1554
-365
lines changed

.eslintrc.js

Lines changed: 60 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,71 @@
11
module.exports = {
2-
parser: '@typescript-eslint/parser',
3-
parserOptions: {
4-
ecmaFeatures: {
5-
jsx: true,
6-
},
7-
},
8-
extends: [
9-
'airbnb',
10-
'plugin:react/recommended',
11-
'plugin:@typescript-eslint/recommended',
12-
'prettier/@typescript-eslint',
13-
'prettier/react',
14-
'plugin:prettier/recommended',
15-
'plugin:testing-library/recommended',
16-
'plugin:jsx-a11y/recommended',
17-
],
18-
settings: {
19-
react: {
20-
version: 'detect',
21-
},
22-
'import/resolver': {
23-
typescript: {},
24-
},
25-
},
2+
extends: ['airbnb', 'plugin:prettier/recommended'],
263
env: {
274
browser: true,
285
node: true,
29-
jest: true,
30-
},
31-
rules: {
32-
'react/no-unused-prop-types': 'off',
33-
'react/require-default-props': 'off',
34-
'react/jsx-filename-extension': 'off',
35-
'react-hooks/rules-of-hooks': 'error',
36-
'react-hooks/exhaustive-deps': 'warn',
37-
'import/prefer-default-export': 'off',
38-
'import/extensions': 'off',
39-
'consistent-return': 'off',
40-
'react/no-danger': 'off',
416
},
42-
plugins: ['@typescript-eslint', 'react-hooks'],
437
overrides: [
448
{
45-
files: ['**/*.js'],
9+
files: ['**/*.tsx'],
10+
plugins: ['@typescript-eslint', 'react-hooks'],
11+
parser: '@typescript-eslint/parser',
12+
parserOptions: {
13+
ecmaFeatures: {
14+
jsx: true,
15+
},
16+
},
17+
extends: [
18+
'plugin:@typescript-eslint/recommended',
19+
'airbnb/hooks',
20+
'plugin:react/recommended',
21+
'plugin:jsx-a11y/recommended',
22+
'plugin:prettier/recommended',
23+
],
24+
settings: {
25+
react: {
26+
version: 'detect',
27+
},
28+
'import/resolver': {
29+
typescript: {},
30+
},
31+
},
4632
rules: {
47-
'@typescript-eslint/no-var-requires': 'off',
33+
'react/no-unused-prop-types': 'off',
34+
'react/require-default-props': 'off',
35+
'react/jsx-filename-extension': 'off',
36+
'react-hooks/rules-of-hooks': 'error',
37+
'react-hooks/exhaustive-deps': 'warn',
38+
'no-use-before-define': 'off',
39+
'@typescript-eslint/no-use-before-define': 'warn',
40+
'import/extensions': 'off',
41+
'consistent-return': 'off',
42+
},
43+
},
44+
{
45+
files: ['**/*.ts'],
46+
plugins: ['@typescript-eslint', 'react-hooks'],
47+
parser: '@typescript-eslint/parser',
48+
settings: {
49+
'import/resolver': {
50+
typescript: {},
51+
},
52+
},
53+
extends: [
54+
'plugin:@typescript-eslint/recommended',
55+
'plugin:prettier/recommended',
56+
],
57+
rules: {
58+
'no-use-before-define': 'off',
59+
'@typescript-eslint/no-use-before-define': 'warn',
60+
'import/prefer-default-export': 'off',
61+
'import/extensions': 'off',
62+
},
63+
},
64+
{
65+
files: ['test-processor.js', 'test-setup.js', 'test/**'],
66+
extends: ['plugin:testing-library/recommended'],
67+
env: {
68+
jest: true,
4869
},
4970
},
5071
],

gatsby-browser.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
21
exports.onRouteUpdate = () => {
32
window.locations = window.locations || [document.referrer];
43
window.locations.push(window.location.href);

gatsby-config.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,10 @@ module.exports = {
6363
resolve: 'gatsby-plugin-manifest',
6464
options: {
6565
name: config.title,
66-
/* eslint-disable @typescript-eslint/camelcase */
6766
short_name: config.title,
6867
start_url: '/',
6968
background_color: config.color,
7069
theme_color: config.color,
71-
/* eslint-disable @typescript-eslint/camelcase */
7270
display: config.display,
7371
icon: config.icon,
7472
},

gatsby-node.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable @typescript-eslint/no-var-requires */
21
// Use in this file CommonJS syntax see https://www.gatsbyjs.org/docs/migrating-from-v1-to-v2/#convert-to-either-pure-commonjs-or-pure-es6
32
const path = require('path');
43
const createSlug = require('./util-node/createSlug');

0 commit comments

Comments
 (0)