소스 검색

Use `@solana/eslint-config-solana` preset

With a handful of rules turned off for now as the generated code doesn't comply with them.
Loris Leiva 1 년 전
부모
커밋
585e59ea1f
3개의 변경된 파일187개의 추가작업 그리고 633개의 파일을 삭제
  1. 6 19
      template/clients/js/clients/js/_.eslintrc.cjs
  2. 1 4
      template/clients/js/clients/js/package.json.njk
  3. 180 610
      template/clients/js/clients/js/pnpm-lock.yaml

+ 6 - 19
template/clients/js/clients/js/_.eslintrc.cjs

@@ -1,24 +1,11 @@
 module.exports = {
-  extends: ['airbnb-base', 'airbnb-typescript/base', 'prettier'],
-  plugins: ['prettier'],
-  overrides: [],
-  parserOptions: {
-    ecmaVersion: 'latest',
-    sourceType: 'module',
-    project: 'tsconfig.json',
-    tsconfigRootDir: __dirname,
-  },
+  extends: ['@solana/eslint-config-solana'],
   rules: {
-    '@typescript-eslint/no-use-before-define': 'off',
-    '@typescript-eslint/no-unused-vars': 'off',
-    'class-methods-use-this': 'off',
-    'import/prefer-default-export': 'off',
-    'import/no-cycle': 'off',
-    'no-underscore-dangle': 'off',
-    'max-classes-per-file': 'off',
-    'no-param-reassign': 'off',
-    'func-names': 'off',
+    '@typescript-eslint/ban-types': 'off',
+    '@typescript-eslint/sort-type-constituents': 'off',
     'prefer-destructuring': 'off',
+    'simple-import-sort/imports': 'off',
+    'sort-keys-fix/sort-keys-fix': 'off',
+    'typescript-sort-keys/interface': 'off',
   },
-  ignorePatterns: ['dist/**', '.eslintrc.cjs', 'tsup.config.ts', 'env-shim.ts'],
 };

+ 1 - 4
template/clients/js/clients/js/package.json.njk

@@ -42,16 +42,13 @@
   },
   "devDependencies": {
     "@ava/typescript": "^4.1.0",
+    "@solana/eslint-config-solana": "^3.0.0",
     "@solana/web3.js": "^2.0.0-preview",
     "@solana/webcrypto-ed25519-polyfill": "^2.0.0-preview",
     "@typescript-eslint/eslint-plugin": "^7.3.1",
     "@typescript-eslint/parser": "^7.3.1",
     "ava": "^6.1.2",
     "eslint": "^8.57.0",
-    "eslint-config-airbnb-typescript": "^18.0.0",
-    "eslint-config-prettier": "^9.1.0",
-    "eslint-plugin-import": "^2.29.0",
-    "eslint-plugin-prettier": "^5.1.3",
     "prettier": "^3.2.5",
     "rimraf": "^5.0.5",
     "tsup": "^8.0.2",

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 180 - 610
template/clients/js/clients/js/pnpm-lock.yaml


이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.