xshell-lint 1.0.3 → 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 +5 -9
  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 来看
@@ -760,11 +759,7 @@ export const xlint_plugin = {
760
759
  };
761
760
  export const xlint_config = {
762
761
  files: ['**/*.{js,mjs,cjs,ts,tsx,mts,cts}'],
763
- ignores: [
764
- '*.d.ts',
765
- 'node_modules/',
766
- '.git/',
767
- ],
762
+ ignores: ['**/*.d.ts'],
768
763
  languageOptions: {
769
764
  ecmaVersion: 'latest',
770
765
  parser: TSParser,
@@ -779,7 +774,6 @@ export const xlint_config = {
779
774
  },
780
775
  plugins: {
781
776
  '@typescript-eslint': ts_plugin,
782
- react: react_plugin,
783
777
  '@stylistic': stylistic_plugin,
784
778
  xlint: xlint_plugin,
785
779
  },
@@ -867,9 +861,11 @@ export const xlint_config = {
867
861
  '@stylistic/quote-props': ['error', 'as-needed', { keywords: false, unnecessary: true }],
868
862
  // ------------ 其它
869
863
  // boolean 属性不要冗余的 ={true} <Component boolprop />
870
- 'react/jsx-boolean-value': ['error', 'never'],
864
+ '@stylistic/jsx-shorthand-boolean': 'error',
871
865
  // 没有 children 的 Component 写成闭合标签 <Component />
872
- 'react/self-closing-comp': 'error',
866
+ '@stylistic/jsx-self-closing-comp': 'error',
867
+ // 无 props 的 Fragment 用 <></> 而不是 <Fragment></Fragment>
868
+ '@stylistic/jsx-shorthand-fragment': 'error',
873
869
  // 单行类型声明用 `,` 分割,多行类型声明结尾不要加分号
874
870
  '@stylistic/member-delimiter-style': [
875
871
  'error',
package/package.json CHANGED
@@ -1,23 +1,22 @@
1
1
  {
2
2
  "name": "xshell-lint",
3
- "version": "1.0.3",
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.1"
18
+ "@types/estree": "^1.0.10",
19
+ "@types/node": "^26.6.6"
21
20
  },
22
21
  "scripts": {
23
22
  "typecheck": "tsc --noEmit",