Skip to content

Commit

Permalink
chore(deps): update dependency eslint to v9 (#1825)
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
3 people authored Aug 22, 2024
1 parent 5798864 commit e009570
Show file tree
Hide file tree
Showing 70 changed files with 698 additions and 546 deletions.
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

50 changes: 0 additions & 50 deletions .eslintrc.json

This file was deleted.

4 changes: 2 additions & 2 deletions .storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* found at http://www.apache.org/licenses/LICENSE-2.0.
*/

const path = require('path');
const { readdirSync } = require('fs');
const path = require('node:path');
const { readdirSync } = require('node:fs');
const webpack = require('webpack');
const svgoConfig = require('../.svgo.config.js');

Expand Down
7 changes: 7 additions & 0 deletions .svgo.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/**
* Copyright Zendesk, Inc.
*
* Use of this source code is governed under the Apache License, Version 2.0
* found at http://www.apache.org/licenses/LICENSE-2.0.
*/

module.exports = {
plugins: [
{
Expand Down
71 changes: 71 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
/**
* Copyright Zendesk, Inc.
*
* Use of this source code is governed under the Apache License, Version 2.0
* found at http://www.apache.org/licenses/LICENSE-2.0.
*/

import prettierConfig from 'eslint-config-prettier';
import config from '@zendeskgarden/eslint-config';
import noticePlugin from '@zendeskgarden/eslint-config/plugins/notice.js';
import reactPlugin from '@zendeskgarden/eslint-config/plugins/react.js';
import typescriptPlugin from '@zendeskgarden/eslint-config/plugins/typescript.js';
import jestPlugin from '@zendeskgarden/eslint-config/plugins/jest.js';
import gardenLocalPlugin from 'eslint-plugin-garden-local';

const typescriptRules = {
...typescriptPlugin.rules,
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/naming-convention': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'logical-assignment-operators': 'off',
'prefer-object-has-own': 'off',
'react/prop-types': 'off'
};

export default [
...config,
noticePlugin,
reactPlugin,
prettierConfig,
{
ignores: ['**/dist']
},
{
rules: {
'sort-imports': 'off',
'react/no-set-state': 'error'
}
},
{
files: ['packages/*/src/**/*.{ts,tsx}'],
ignores: ['packages/.template/**/*.{ts,tsx}'],
...typescriptPlugin,
rules: {
...typescriptRules
}
},
{
files: ['packages/*/src/**/*.{ts,tsx}'],
ignores: ['packages/.template/**/*.{ts,tsx}', 'packages/*/src/**/*.spec.{ts,tsx}'],
plugins: {
'garden-local': gardenLocalPlugin
},
rules: {
'garden-local/require-default-theme': 'error'
}
},
{
files: ['packages/*/src/**/*.spec.{ts,tsx}'],
ignores: ['packages/.template/**/*.spec.{ts,tsx}'],
...typescriptPlugin,
...jestPlugin,
rules: {
...typescriptRules,
...jestPlugin.rules,
'no-console': 'off',
'react/button-has-type': 'off'
}
}
];
Loading

0 comments on commit e009570

Please sign in to comment.