xshell-lint 1.0.4 → 1.0.5

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.
Files changed (2) hide show
  1. package/index.js +4 -4
  2. package/package.json +9 -10
package/index.js CHANGED
@@ -3,7 +3,6 @@ import { builtinModules } from 'node:module';
3
3
  import { AST_TOKEN_TYPES, AST_NODE_TYPES, ASTUtils } from '@typescript-eslint/utils';
4
4
  import TSParser from '@typescript-eslint/parser';
5
5
  import ts_plugin from '@typescript-eslint/eslint-plugin';
6
- import react_plugin from 'eslint-plugin-react';
7
6
  import stylistic_plugin from '@stylistic/eslint-plugin';
8
7
  import { array_equals, check, path } from 'xshell';
9
8
  // 用 ast explorer 选 esprima 来看
@@ -775,7 +774,6 @@ export const xlint_config = {
775
774
  },
776
775
  plugins: {
777
776
  '@typescript-eslint': ts_plugin,
778
- react: react_plugin,
779
777
  '@stylistic': stylistic_plugin,
780
778
  xlint: xlint_plugin,
781
779
  },
@@ -863,9 +861,11 @@ export const xlint_config = {
863
861
  '@stylistic/quote-props': ['error', 'as-needed', { keywords: false, unnecessary: true }],
864
862
  // ------------ 其它
865
863
  // boolean 属性不要冗余的 ={true} <Component boolprop />
866
- 'react/jsx-boolean-value': ['error', 'never'],
864
+ '@stylistic/jsx-shorthand-boolean': 'error',
867
865
  // 没有 children 的 Component 写成闭合标签 <Component />
868
- 'react/self-closing-comp': 'error',
866
+ '@stylistic/jsx-self-closing-comp': 'error',
867
+ // 无 props 的 Fragment 用 <></> 而不是 <Fragment></Fragment>
868
+ '@stylistic/jsx-shorthand-fragment': 'error',
869
869
  // 单行类型声明用 `,` 分割,多行类型声明结尾不要加分号
870
870
  '@stylistic/member-delimiter-style': [
871
871
  'error',
package/package.json CHANGED
@@ -1,23 +1,22 @@
1
1
  {
2
2
  "name": "xshell-lint",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "publisher": "ShenHongFei",
7
7
  "homepage": "https://www.npmjs.com/package/xshell-lint",
8
8
  "dependencies": {
9
- "@stylistic/eslint-plugin": "^5.10.0",
10
- "@typescript-eslint/eslint-plugin": "^8.70.1",
11
- "@typescript-eslint/parser": "^8.70.1",
12
- "@typescript-eslint/utils": "^8.70.1",
13
- "eslint": "^10.11.0",
14
- "eslint-plugin-react": "^7.37.5",
15
- "xshell": "^1.4.61"
9
+ "@stylistic/eslint-plugin": "^6.0.1",
10
+ "@typescript-eslint/eslint-plugin": "^8.73.0",
11
+ "@typescript-eslint/parser": "^8.73.0",
12
+ "@typescript-eslint/utils": "^8.73.0",
13
+ "eslint": "^10.15.0",
14
+ "xshell": "^1.4.76"
16
15
  },
17
16
  "devDependencies": {
18
17
  "@types/eslint": "^9.6.1",
19
- "@types/estree": "^1.0.9",
20
- "@types/node": "^26.6.2"
18
+ "@types/estree": "^1.0.10",
19
+ "@types/node": "^26.6.6"
21
20
  },
22
21
  "scripts": {
23
22
  "typecheck": "tsc --noEmit",