Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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