Skip to content
Myr

eslint.config.mjs

This file

Path

eslint.config.mjs

110 lines · 2.8 KiB · JavaScript

Last changed by

chore(eslint.config): use 'globalIgnores' for ignored directories (#3365)Wonsuk Choibefore adoptionc27934d

History of this file

Take it

The walk stopped after 200 commits: lines older than f85898f point at it.

chore(eslint.config.mjs): update 'eslint-plugin-react-hooks', 'eslint-plugin-react-compiler' config (#3043)Wonsuk Choibefore adoptionf85898f

lines 1–2why, one step back
1import eslint from '@eslint/js'
2import vitest from '@vitest/eslint-plugin'

chore(eslint.config): use 'globalIgnores' for ignored directories (#3365)Wonsuk Choibefore adoptionc27934d

line 3why, one step back
3import { defineConfig, globalIgnores } from 'eslint/config'

chore(eslint.config.mjs): update 'eslint-plugin-react-hooks', 'eslint-plugin-react-compiler' config (#3043)Wonsuk Choibefore adoptionf85898f

lines 4–10why, one step back
4import importPlugin from 'eslint-plugin-import'
5import jestDom from 'eslint-plugin-jest-dom'6import react from 'eslint-plugin-react'7import reactHooks from 'eslint-plugin-react-hooks'8import testingLibrary from 'eslint-plugin-testing-library'9import tseslint from 'typescript-eslint'10

chore(eslint.config): replace deprecated 'tseslint.config' with 'defineConfig' (#3231)Wonsuk Choibefore adoption612d5c4

line 11why, one step back
11export default defineConfig(

chore(eslint.config): use 'globalIgnores' for ignored directories (#3365)Wonsuk Choibefore adoptionc27934d

line 12why, one step back
12 globalIgnores(['dist/', 'examples/', 'website/', 'coverage/']),

chore(eslint.config.mjs): update 'eslint-plugin-react-hooks', 'eslint-plugin-react-compiler' config (#3043)Wonsuk Choibefore adoptionf85898f

lines 13–17why, one step back
13 eslint.configs.recommended,
14 importPlugin.flatConfigs.recommended,15 tseslint.configs.recommended,16 react.configs.flat.recommended,17 react.configs.flat['jsx-runtime'],

chore: update dev dependencies (#3279)Daishi Katobefore adoption18ab9e2

line 18why, one step back
18 reactHooks.configs.flat.recommended,

chore(eslint.config.mjs): update 'eslint-plugin-react-hooks', 'eslint-plugin-react-compiler' config (#3043)Wonsuk Choibefore adoptionf85898f

line 19why, one step back
19 {

chore(eslint): enable 'testing-library', 'jest-dom', 'vitest' plugins and fix violations (#3321)Wonsuk Choibefore adoption234a948

lines 20–24why, one step back
20 languageOptions: {
21 parserOptions: {22 project: true,23 },24 },

chore(eslint.config.mjs): update 'eslint-plugin-react-hooks', 'eslint-plugin-react-compiler' config (#3043)Wonsuk Choibefore adoptionf85898f

lines 25–46why, one step back
25 settings: {
26 react: {27 version: 'detect',28 },29 'import/resolver': {30 typescript: true,31 },32 },33 rules: {34 eqeqeq: 'error',35 curly: ['warn', 'multi-line', 'consistent'],36 'sort-imports': [37 'error',38 {39 ignoreDeclarationSort: true,40 },41 ],42 'import/no-unresolved': ['error', { commonjs: true, amd: true }],43 'import/named': 'off',44 'import/namespace': 'off',45 'import/no-named-as-default-member': 'off',46 'import/no-duplicates': 'error',

chore(eslint): enforce file extension usage for internal modules, ignore external packages (#3116)Wonsuk Choibefore adoption028909e

line 47why, one step back
47 'import/extensions': ['error', 'always', { ignorePackages: true }],

chore(eslint.config.mjs): update 'eslint-plugin-react-hooks', 'eslint-plugin-react-compiler' config (#3043)Wonsuk Choibefore adoptionf85898f

lines 48–73why, one step back
48 'import/order': [
49 'error',50 {51 alphabetize: { order: 'asc', caseInsensitive: true },52 groups: [53 'builtin',54 'external',55 'internal',56 'parent',57 'sibling',58 'index',59 'object',60 ],61 'newlines-between': 'never',62 pathGroups: [63 {64 pattern: 'react',65 group: 'builtin',66 position: 'before',67 },68 ],69 pathGroupsExcludedImportTypes: ['builtin'],70 },71 ],72 '@typescript-eslint/no-explicit-any': 'off',73 '@typescript-eslint/no-unused-vars': [

chore: strict unused check (#3215)Daishi Katobefore adoptionc4085a4

line 74why, one step back
74 'error',

chore(eslint.config.mjs): update 'eslint-plugin-react-hooks', 'eslint-plugin-react-compiler' config (#3043)Wonsuk Choibefore adoptionf85898f

lines 75–81why, one step back
75 { argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
76 ],77 },78 },79 {80 files: ['tests/**/*.{ts,tsx}'],81 ...testingLibrary.configs['flat/react'],

chore(eslint): enable 'testing-library', 'jest-dom', 'vitest' plugins and fix violations (#3321)Wonsuk Choibefore adoption234a948

lines 82–84why, one step back
82 },
83 {84 files: ['tests/**/*.{ts,tsx}'],

chore(eslint.config.mjs): update 'eslint-plugin-react-hooks', 'eslint-plugin-react-compiler' config (#3043)Wonsuk Choibefore adoptionf85898f

line 85why, one step back
85 ...jestDom.configs['flat/recommended'],

chore(eslint): enable 'testing-library', 'jest-dom', 'vitest' plugins and fix violations (#3321)Wonsuk Choibefore adoption234a948

lines 86–88why, one step back
86 },
87 {88 files: ['tests/**/*.{ts,tsx}'],

chore(eslint.config.mjs): update 'eslint-plugin-react-hooks', 'eslint-plugin-react-compiler' config (#3043)Wonsuk Choibefore adoptionf85898f

line 89why, one step back
89 ...vitest.configs.recommended,

chore(eslint): enable 'testing-library', 'jest-dom', 'vitest' plugins and fix violations (#3321)Wonsuk Choibefore adoption234a948

lines 90–93why, one step back
90 settings: { vitest: { typecheck: true } },
91 },92 {93 files: ['tests/**/*.{ts,tsx}'],

chore(eslint.config.mjs): update 'eslint-plugin-react-hooks', 'eslint-plugin-react-compiler' config (#3043)Wonsuk Choibefore adoptionf85898f

lines 94–99why, one step back
94 rules: {
95 'import/extensions': ['error', 'never'],96 'vitest/consistent-test-it': [97 'error',98 { fn: 'it', withinDescribe: 'it' },99 ],

chore(eslint): enable 'testing-library', 'jest-dom', 'vitest' plugins and fix violations (#3321)Wonsuk Choibefore adoption234a948

lines 100–107why, one step back
100 },
101 },102 {103 files: ['*.config.*'],104 languageOptions: {105 parserOptions: {106 project: null,107 },

chore(eslint.config.mjs): update 'eslint-plugin-react-hooks', 'eslint-plugin-react-compiler' config (#3043)Wonsuk Choibefore adoptionf85898f

lines 108–110why, one step back
108 },
109 },110)