Skip to content

Commit

Permalink
Eslint config 9.0 migration (#164)
Browse files Browse the repository at this point in the history
* update eslint development dependencies

* add additional eslint dependencies and migrate to new new flat file eslint.config.js

* bump patch dev dependencies

* update additional eslint dev dependencies with breaking changes

* update vite dev dependencies with breaking changes

* jsdom and msw updates

The MSW 2.4.0 release inlcudes an HttpResponse.html() method (before it was pretty much json or nothing)

* update react-icons

* update react-router-dom

there are not any features are patches that we need here at the moment

* update zustand patch version

* dagre and dompurify patch version updates

* increment patch version

* use type alias instead of extending interfaces per eslint rule
  • Loading branch information
dpgraham4401 authored Sep 5, 2024
1 parent 0318256 commit 7fa6fb6
Show file tree
Hide file tree
Showing 14 changed files with 931 additions and 1,245 deletions.
30 changes: 0 additions & 30 deletions .eslintrc.cjs

This file was deleted.

69 changes: 69 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
import reactPlugin from 'eslint-plugin-react'; // https://github.com/jsx-eslint/eslint-plugin-react?tab=readme-ov-file#configuration
import globals from 'globals';
import pluginJs from '@eslint/js';
import tsEslint from 'typescript-eslint';
import jsxA11y from 'eslint-plugin-jsx-a11y';
import tailwind from 'eslint-plugin-tailwindcss';
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';

export default [
pluginJs.configs.recommended,
jsxA11y.flatConfigs.recommended,
...tsEslint.configs.strict,
...tsEslint.configs.stylistic,
eslintPluginPrettierRecommended,
...tailwind.configs['flat/recommended'],
{
name: 'tailwind-migration',
files: ['**/*.{js,mjs,cjs,ts,jsx,tsx}'],
rules: {
'tailwindcss/no-custom-classname': 0,
},
},
{
name: 'ignore-outputs',
ignores: ['**/build/', '**/dist/', '**/node_modules/', '**/.next/'],
},
{
name: 'react',
files: ['**/*.{js,mjs,cjs,ts,jsx,tsx}'],
...reactPlugin.configs.flat.recommended,
languageOptions: {
...reactPlugin.configs.flat.recommended.languageOptions,
globals: globals.browser,
parserOptions: {
ecmaFeatures: { jsx: true },
},
},
rules: {
'react/react-in-jsx-scope': 0,
'react/jsx-uses-react': 0,
},
},
{
name: 'ts-migration-relax',
files: ['**/*.{ts,tsx}'],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/no-empty-function': 'off',
},
},
{
name: 'ts-unused-vars',
rules: {
'@typescript-eslint/no-unused-vars': [
'error',
{
args: 'all',
argsIgnorePattern: '^_',
caughtErrors: 'all',
caughtErrorsIgnorePattern: '^_',
destructuredArrayIgnorePattern: '^_',
varsIgnorePattern: '^_',
// ignoreRestSiblings: true, - if you want to ignore unused rest siblings
},
],
},
},
];
Loading

0 comments on commit 7fa6fb6

Please sign in to comment.