Skip to content

Commit e009570

Browse files
renovate[bot]geotrevjzempel
authored
chore(deps): update dependency eslint to v9 (#1825)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: george treviranus <[email protected]> Co-authored-by: Jonathan Zempel <[email protected]>
1 parent 5798864 commit e009570

File tree

70 files changed

+698
-546
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+698
-546
lines changed

.eslintignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

.eslintrc.json

Lines changed: 0 additions & 50 deletions
This file was deleted.

.storybook/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
* found at http://www.apache.org/licenses/LICENSE-2.0.
66
*/
77

8-
const path = require('path');
9-
const { readdirSync } = require('fs');
8+
const path = require('node:path');
9+
const { readdirSync } = require('node:fs');
1010
const webpack = require('webpack');
1111
const svgoConfig = require('../.svgo.config.js');
1212

.svgo.config.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
/**
2+
* Copyright Zendesk, Inc.
3+
*
4+
* Use of this source code is governed under the Apache License, Version 2.0
5+
* found at http://www.apache.org/licenses/LICENSE-2.0.
6+
*/
7+
18
module.exports = {
29
plugins: [
310
{

eslint.config.mjs

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
/**
2+
* Copyright Zendesk, Inc.
3+
*
4+
* Use of this source code is governed under the Apache License, Version 2.0
5+
* found at http://www.apache.org/licenses/LICENSE-2.0.
6+
*/
7+
8+
import prettierConfig from 'eslint-config-prettier';
9+
import config from '@zendeskgarden/eslint-config';
10+
import noticePlugin from '@zendeskgarden/eslint-config/plugins/notice.js';
11+
import reactPlugin from '@zendeskgarden/eslint-config/plugins/react.js';
12+
import typescriptPlugin from '@zendeskgarden/eslint-config/plugins/typescript.js';
13+
import jestPlugin from '@zendeskgarden/eslint-config/plugins/jest.js';
14+
import gardenLocalPlugin from 'eslint-plugin-garden-local';
15+
16+
const typescriptRules = {
17+
...typescriptPlugin.rules,
18+
'@typescript-eslint/explicit-function-return-type': 'off',
19+
'@typescript-eslint/explicit-module-boundary-types': 'off',
20+
'@typescript-eslint/naming-convention': 'off',
21+
'@typescript-eslint/no-explicit-any': 'off',
22+
'logical-assignment-operators': 'off',
23+
'prefer-object-has-own': 'off',
24+
'react/prop-types': 'off'
25+
};
26+
27+
export default [
28+
...config,
29+
noticePlugin,
30+
reactPlugin,
31+
prettierConfig,
32+
{
33+
ignores: ['**/dist']
34+
},
35+
{
36+
rules: {
37+
'sort-imports': 'off',
38+
'react/no-set-state': 'error'
39+
}
40+
},
41+
{
42+
files: ['packages/*/src/**/*.{ts,tsx}'],
43+
ignores: ['packages/.template/**/*.{ts,tsx}'],
44+
...typescriptPlugin,
45+
rules: {
46+
...typescriptRules
47+
}
48+
},
49+
{
50+
files: ['packages/*/src/**/*.{ts,tsx}'],
51+
ignores: ['packages/.template/**/*.{ts,tsx}', 'packages/*/src/**/*.spec.{ts,tsx}'],
52+
plugins: {
53+
'garden-local': gardenLocalPlugin
54+
},
55+
rules: {
56+
'garden-local/require-default-theme': 'error'
57+
}
58+
},
59+
{
60+
files: ['packages/*/src/**/*.spec.{ts,tsx}'],
61+
ignores: ['packages/.template/**/*.spec.{ts,tsx}'],
62+
...typescriptPlugin,
63+
...jestPlugin,
64+
rules: {
65+
...typescriptRules,
66+
...jestPlugin.rules,
67+
'no-console': 'off',
68+
'react/button-has-type': 'off'
69+
}
70+
}
71+
];

0 commit comments

Comments
 (0)