@tanstack/eslint-config 0.2.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/eslint-config",
3
- "version": "0.2.0",
3
+ "version": "0.3.1",
4
4
  "description": "Shared ESLint config used by TanStack projects.",
5
5
  "author": "tannerlinsley",
6
6
  "license": "MIT",
@@ -32,21 +32,20 @@
32
32
  "node": ">=18"
33
33
  },
34
34
  "dependencies": {
35
- "@eslint/js": "^9.27.0",
36
- "@stylistic/eslint-plugin": "^4.4.0",
37
- "eslint-plugin-import-x": "^4.13.3",
38
- "eslint-plugin-n": "^17.18.0",
39
- "globals": "^16.2.0",
40
- "typescript-eslint": "^8.32.1",
41
- "vue-eslint-parser": "^10.1.3"
35
+ "@eslint/js": "^9.34.0",
36
+ "@stylistic/eslint-plugin": "^5.2.3",
37
+ "eslint-plugin-import-x": "^4.16.1",
38
+ "eslint-plugin-n": "^17.21.3",
39
+ "globals": "^16.3.0",
40
+ "typescript-eslint": "^8.40.0",
41
+ "vue-eslint-parser": "^10.2.0"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@types/eslint": "^9.6.1",
45
- "eslint": "^9.27.0"
45
+ "eslint": "^9.34.0"
46
46
  },
47
47
  "scripts": {
48
48
  "test:types": "tsc",
49
- "test:eslint": "eslint ./src",
50
49
  "test:build": "publint --strict"
51
50
  }
52
51
  }
package/src/import.js CHANGED
@@ -10,8 +10,6 @@ export const importRules = {
10
10
  'import/newline-after-import': 'error',
11
11
  /** No require() or module.exports */
12
12
  'import/no-commonjs': 'error',
13
- /** No import loops */
14
- 'import/no-cycle': 'error',
15
13
  /** Reports if a resolved path is imported more than once */
16
14
  'import/no-duplicates': 'error',
17
15
  /** Stylistic preference */
package/src/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import tseslint from 'typescript-eslint'
2
- import vueparser from 'vue-eslint-parser'
3
- import stylisticJs from '@stylistic/eslint-plugin'
4
- import pluginImport from 'eslint-plugin-import-x'
5
- import pluginNode from 'eslint-plugin-n'
2
+ import vueParser from 'vue-eslint-parser'
3
+ import stylisticPlugin from '@stylistic/eslint-plugin'
4
+ import importPlugin from 'eslint-plugin-import-x'
5
+ import nodePlugin from 'eslint-plugin-n'
6
6
  import globals from 'globals'
7
7
  import { javascriptRules } from './javascript.js'
8
8
  import { importRules } from './import.js'
@@ -10,9 +10,6 @@ import { typescriptRules } from './typescript.js'
10
10
  import { nodeRules } from './node.js'
11
11
  import { stylisticRules } from './stylistic.js'
12
12
 
13
- const JS_GLOB_INCLUDE = ['**/*.{js,ts,tsx}']
14
- const VUE_GLOB_INCLUDE = ['**/*.vue']
15
-
16
13
  const GLOB_EXCLUDE = [
17
14
  '**/.nx/**',
18
15
  '**/.svelte-kit/**',
@@ -32,10 +29,10 @@ const jsRules = {
32
29
  }
33
30
 
34
31
  const jsPlugins = {
35
- '@stylistic/js': stylisticJs,
32
+ '@stylistic': stylisticPlugin,
36
33
  '@typescript-eslint': tseslint.plugin,
37
- import: pluginImport,
38
- node: pluginNode,
34
+ import: importPlugin,
35
+ node: nodePlugin,
39
36
  }
40
37
 
41
38
  /** @type {import('eslint').Linter.Config[]} */
@@ -45,12 +42,11 @@ export const tanstackConfig = [
45
42
  ignores: GLOB_EXCLUDE,
46
43
  },
47
44
  {
48
- name: 'tanstack/setup',
49
- files: JS_GLOB_INCLUDE,
45
+ name: 'tanstack/javascript',
46
+ files: ['**/*.{js,ts,tsx}'],
50
47
  languageOptions: {
51
48
  sourceType: 'module',
52
49
  ecmaVersion: 2020,
53
- // @ts-expect-error
54
50
  parser: tseslint.parser,
55
51
  parserOptions: {
56
52
  project: true,
@@ -66,9 +62,9 @@ export const tanstackConfig = [
66
62
  },
67
63
  {
68
64
  name: 'tanstack/vue',
69
- files: VUE_GLOB_INCLUDE,
65
+ files: ['**/*.vue'],
70
66
  languageOptions: {
71
- parser: vueparser,
67
+ parser: vueParser,
72
68
  parserOptions: {
73
69
  sourceType: 'module',
74
70
  ecmaVersion: 2020,
package/src/stylistic.js CHANGED
@@ -3,5 +3,5 @@
3
3
  /** @type {import('eslint').Linter.RulesRecord} */
4
4
  export const stylisticRules = {
5
5
  /** Enforce consistency of spacing after the start of a comment */
6
- '@stylistic/js/spaced-comment': 'error',
6
+ '@stylistic/spaced-comment': 'error',
7
7
  }