chore(deps): update dependency eslint to v9 (#16661) · vitejs/vite@6c10662 (original) (raw)

`@@ -2,9 +2,8 @@

`

2

2

`import { builtinModules, createRequire } from 'node:module'

`

3

3

`import eslint from '@eslint/js'

`

4

4

`import pluginN from 'eslint-plugin-n'

`

5

``

`-

import * as pluginI from 'eslint-plugin-i'

`

``

5

`+

import pluginImportX from 'eslint-plugin-import-x'

`

6

6

`import pluginRegExp from 'eslint-plugin-regexp'

`

7

``

`-

import tsParser from '@typescript-eslint/parser'

`

8

7

`import tseslint from 'typescript-eslint'

`

9

8

`import globals from 'globals'

`

10

9

``

`@@ -27,11 +26,11 @@ export default tseslint.config(

`

27

26

`eslint.configs.recommended,

`

28

27

` ...tseslint.configs.recommended,

`

29

28

` ...tseslint.configs.stylistic,

`

30

``

`-

/** @type {any} */ (pluginRegExp.configs['flat/recommended']),

`

``

29

`+

pluginRegExp.configs['flat/recommended'],

`

31

30

`{

`

32

31

`name: 'main',

`

33

32

`languageOptions: {

`

34

``

`-

parser: tsParser,

`

``

33

`+

parser: tseslint.parser,

`

35

34

`parserOptions: {

`

36

35

`sourceType: 'module',

`

37

36

`ecmaVersion: 2022,

`

`@@ -43,7 +42,7 @@ export default tseslint.config(

`

43

42

`},

`

44

43

`plugins: {

`

45

44

`n: pluginN,

`

46

``

`-

i: pluginI,

`

``

45

`+

'import-x': pluginImportX,

`

47

46

`},

`

48

47

`rules: {

`

49

48

`'n/no-exports-assign': 'error',

`

`@@ -117,12 +116,12 @@ export default tseslint.config(

`

117

116

`'@typescript-eslint/prefer-for-of': 'off',

`

118

117

`'@typescript-eslint/prefer-function-type': 'off',

`

119

118

``

120

``

`-

'i/no-nodejs-modules': [

`

``

119

`+

'import-x/no-nodejs-modules': [

`

121

120

`'error',

`

122

121

`` { allow: builtinModules.map((mod) => node:${mod}) },

``

123

122

`],

`

124

``

`-

'i/no-duplicates': 'error',

`

125

``

`-

'i/order': 'error',

`

``

123

`+

'import-x/no-duplicates': 'error',

`

``

124

`+

'import-x/order': 'error',

`

126

125

`'sort-imports': [

`

127

126

`'error',

`

128

127

`{

`

`@@ -177,7 +176,7 @@ export default tseslint.config(

`

177

176

`'playground/tailwind/**', // blocked by https://github.com/postcss/postcss-load-config/issues/239

`

178

177

`],

`

179

178

`rules: {

`

180

``

`-

'i/no-commonjs': 'error',

`

``

179

`+

'import-x/no-commonjs': 'error',

`

181

180

`},

`

182

181

`},

`

183

182

`{

`