Skip to content

Commit

Permalink
Merge pull request #834 from magiclabs/PDEEXP-1985-bump-magic-sdk-esl…
Browse files Browse the repository at this point in the history
…int-version-to-9

chore: bump eslint version
  • Loading branch information
Ethella authored Nov 26, 2024
2 parents 936a5bd + 528d254 commit 282932f
Show file tree
Hide file tree
Showing 170 changed files with 2,561 additions and 1,456 deletions.
6 changes: 0 additions & 6 deletions .eslintignore

This file was deleted.

39 changes: 0 additions & 39 deletions .eslintrc.js

This file was deleted.

11 changes: 10 additions & 1 deletion .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
module.exports = require('@ikscodes/prettier-config');
/**
* @type {import("prettier").Config}
*/
const config = {
arrowParens: 'avoid',
printWidth: 120,
singleQuote: true,
};

module.exports = config;
75 changes: 75 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
import tsLint from '@typescript-eslint/eslint-plugin';
import tsParser from '@typescript-eslint/parser';
import globals from 'globals';
import jsxA11Y from 'eslint-plugin-jsx-a11y';
import prettier from 'eslint-plugin-prettier';
import importPlugin from 'eslint-plugin-import';
import js from '@eslint/js';

export default [
js.configs.recommended,
{
ignores: [
'**/node_modules',
'**/coverage',
'**/dist',
'**/jest.config.ts',
'scripts/bin/scaffold/template/**/*',
'.prettierrc.js',
],
},
{
plugins: {
'@typescript-eslint': tsLint,
'jsx-a11y': jsxA11Y,
prettier,
importPlugin,
},

languageOptions: {
globals: {
...globals.browser,
...globals.node,
...globals.jest,
},

parser: tsParser,
ecmaVersion: 12,
sourceType: 'module',
},

files: ['**/*.ts', '**/*.tsx'],

rules: {
'no-alert': 'off',
'no-dupe-class-members': 'off',
'no-underscore-dangle': 'off',
'no-useless-constructor': 'off',
'no-unused-vars': 'off',
'no-redeclare': 'off',
'class-methods-use-this': 'off',
'importPlugin/extensions': 'off',
'importPlugin/no-extraneous-dependencies': 'off',
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/await-thenable': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-floating-promises': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-useless-constructor': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/restrict-template-expressions': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
},

settings: {
'importPlugin/resolver': {
typescript: {
directory: ['**/tsconfig.json'],
},
},
},
},
];
31 changes: 18 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@
"postinstall": "husky install"
},
"devDependencies": {
"@eslint/compat": "^1.2.2",
"@eslint/eslintrc": "^3.1.0",
"@eslint/js": "^9.14.0",
"@ikscodes/browser-env": "~0.3.1",
"@ikscodes/eslint-config": "~7.0.2",
"@ikscodes/prettier-config": "~2.0.1",
"@istanbuljs/nyc-config-typescript": "~0.1.3",
"@types/fs-extra": "^9.0.13",
"@types/inquirer": "^8.1.1",
Expand All @@ -29,22 +30,25 @@
"@types/rimraf": "^3.0.2",
"@types/tsc-watch": "^4.2.0",
"@types/whatwg-url": "^6.4.0",
"@typescript-eslint/eslint-plugin": "~3.4.0",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "7.12.0",
"auto": "^11.1.2",
"babel-jest": "^27.0.6",
"brotli-size": "^4.0.0",
"chalk": "~4.1.2",
"enquirer": "^2.3.6",
"esbuild": "^0.14.13",
"eslint": "~7.3.1",
"eslint-import-resolver-typescript": "~2.0.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jsx-a11y": "~6.3.1",
"eslint-plugin-prettier": "~3.1.4",
"eslint-plugin-react": "~7.20.0",
"eslint-plugin-react-hooks": "~4.0.4",
"eslint": "9.14.0",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-typescript": "^3.6.3",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "^7.37.2",
"eslint-plugin-react-hooks": "^4.6.0",
"execa": "~5.1.1",
"fs-extra": "^10.0.0",
"globals": "^15.12.0",
"gzip-size": "^6.0.0",
"husky": "^7.0.1",
"inquirer": "^8.1.2",
Expand All @@ -58,7 +62,7 @@
"nyc": "13.1.0",
"ora": "~5.4.1",
"p-limit": "^3.1.0",
"prettier": "~2.3.2",
"prettier": "^3.3.3",
"pretty-bytes": "^5.6.0",
"react": "^16.13.1",
"react-native": "^0.62.2",
Expand All @@ -69,7 +73,7 @@
"ts-node": "^10.2.0",
"tsc-watch": "^4.2.9",
"tslib": "^2.3.1",
"typescript": "~4.5.2",
"typescript": "~5.4.5",
"wsrun": "^5.2.1",
"zombi": "^3.3.0"
},
Expand All @@ -81,7 +85,8 @@
]
},
"resolutions": {
"@rollup/plugin-commonjs": "^17.0.0"
"@rollup/plugin-commonjs": "^17.0.0",
"eslint": "9.14.0"
},
"repository": "magiclabs/magic-js",
"author": "Magic Labs <[email protected]>",
Expand Down
5 changes: 0 additions & 5 deletions packages/@magic-ext/algorand/.eslintignore

This file was deleted.

7 changes: 0 additions & 7 deletions packages/@magic-ext/algorand/.eslintrc.js

This file was deleted.

21 changes: 21 additions & 0 deletions packages/@magic-ext/algorand/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import rootEslintConfig from '../../../eslint.config.mjs';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

export default [
...rootEslintConfig,
{
ignores: ['node_modules', 'coverage', 'dist', 'eslint.config.mjs', 'jest.config.ts'],
},
{
languageOptions: {
parserOptions: {
project: ['./tsconfig.json'],
tsconfigRootDir: __dirname,
},
},
},
];
5 changes: 0 additions & 5 deletions packages/@magic-ext/aptos/.eslintignore

This file was deleted.

7 changes: 0 additions & 7 deletions packages/@magic-ext/aptos/.eslintrc.js

This file was deleted.

21 changes: 21 additions & 0 deletions packages/@magic-ext/aptos/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import rootEslintConfig from '../../../eslint.config.mjs';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

export default [
...rootEslintConfig,
{
ignores: ['node_modules', 'coverage', 'dist', 'eslint.config.mjs', 'jest.config.ts'],
},
{
languageOptions: {
parserOptions: {
project: ['./tsconfig.json', './test/tsconfig.json'],
tsconfigRootDir: __dirname,
},
},
},
];
1 change: 0 additions & 1 deletion packages/@magic-ext/aptos/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Extension } from '@magic-sdk/commons';

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
import { AptosClient, BCS, TxnBuilderTypes, Types, getAddressFromAccountOrAddress } from 'aptos';
import { AccountInfo, SignMessagePayload, SignMessageResponse } from '@aptos-labs/wallet-adapter-core';
Expand Down
5 changes: 0 additions & 5 deletions packages/@magic-ext/avalanche/.eslintignore

This file was deleted.

7 changes: 0 additions & 7 deletions packages/@magic-ext/avalanche/.eslintrc.js

This file was deleted.

21 changes: 21 additions & 0 deletions packages/@magic-ext/avalanche/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import rootEslintConfig from '../../../eslint.config.mjs';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

export default [
...rootEslintConfig,
{
ignores: ['node_modules', 'coverage', 'dist', 'eslint.config.mjs', 'jest.config.ts'],
},
{
languageOptions: {
parserOptions: {
project: ['./tsconfig.json'],
tsconfigRootDir: __dirname,
},
},
},
];
5 changes: 0 additions & 5 deletions packages/@magic-ext/bitcoin/.eslintignore

This file was deleted.

7 changes: 0 additions & 7 deletions packages/@magic-ext/bitcoin/.eslintrc.js

This file was deleted.

21 changes: 21 additions & 0 deletions packages/@magic-ext/bitcoin/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import rootEslintConfig from '../../../eslint.config.mjs';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

export default [
...rootEslintConfig,
{
ignores: ['node_modules', 'coverage', 'dist', 'eslint.config.mjs', 'jest.config.ts'],
},
{
languageOptions: {
parserOptions: {
project: ['./tsconfig.json'],
tsconfigRootDir: __dirname,
},
},
},
];
5 changes: 0 additions & 5 deletions packages/@magic-ext/conflux/.eslintignore

This file was deleted.

7 changes: 0 additions & 7 deletions packages/@magic-ext/conflux/.eslintrc.js

This file was deleted.

21 changes: 21 additions & 0 deletions packages/@magic-ext/conflux/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import rootEslintConfig from '../../../eslint.config.mjs';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

export default [
...rootEslintConfig,
{
ignores: ['node_modules', 'coverage', 'dist', 'eslint.config.mjs', 'jest.config.ts'],
},
{
languageOptions: {
parserOptions: {
project: ['./tsconfig.json'],
tsconfigRootDir: __dirname,
},
},
},
];
Loading

0 comments on commit 282932f

Please sign in to comment.