diff --git a/nym-wallet/.eslintrc b/nym-wallet/.eslintrc deleted file mode 100644 index a7a2869a49..0000000000 --- a/nym-wallet/.eslintrc +++ /dev/null @@ -1,109 +0,0 @@ -{ - "env": { - "browser": true, - "es6": true, - "node": true, - "jest": true - }, - "parserOptions": { - "ecmaFeatures": { - "jsx": true - }, - "ecmaVersion": 2019, - "sourceType": "module" - }, - "globals": { - "Atomics": "readonly", - "SharedArrayBuffer": "readonly" - }, - "plugins": ["react", "react-hooks", "jsx-a11y", "prettier", "jest"], - "extends": [ - "plugin:react/recommended", - "airbnb", - "prettier", - "plugin:jest/recommended", - "plugin:jest/style" - ], - "rules": { - "jest/prefer-strict-equal": "error", - "jest/prefer-to-have-length": "warn", - "prettier/prettier": "error", - "import/prefer-default-export": "off", - "react/prop-types": "off", - "react/jsx-filename-extension": "off", - "react/jsx-props-no-spreading": "off", - "import/no-extraneous-dependencies": [ - "error", - { - "devDependencies": [ - "**/*.test.[jt]s", - "**/*.spec.[jt]s", - "**/*.test.[jt]sx", - "**/*.spec.[jt]sx" - ] - } - ], - "import/extensions": [ - "error", - "ignorePackages", - { - "ts": "never", - "tsx": "never", - "js": "never", - "jsx": "never" - } - ] - }, - "overrides": [ - { - "files": "**/*.+(ts|tsx)", - "parser": "@typescript-eslint/parser", - "parserOptions": { - "project": "./tsconfig.json" - }, - "plugins": ["@typescript-eslint/eslint-plugin"], - "extends": [ - "plugin:@typescript-eslint/eslint-recommended", - "plugin:@typescript-eslint/recommended", - "prettier" - ], - "rules": { - "@typescript-eslint/explicit-function-return-type": "off", - "@typescript-eslint/no-explicit-any": "off", - "@typescript-eslint/no-var-requires": "off", - "no-use-before-define": [0], - "@typescript-eslint/no-use-before-define": [1], - "import/no-unresolved": 0, - "import/no-extraneous-dependencies": [ - "error", - { - "devDependencies": [ - "**/*.test.ts", - "**/*.spec.ts", - "**/*.test.tsx", - "**/*.spec.tsx" - ] - } - ], - "quotes": "off", - "@typescript-eslint/quotes": [ - 2, - "single", - { - "avoidEscape": true - } - ], - "@typescript-eslint/no-unused-vars": [2, { "argsIgnorePattern": "^_" }] - } - } - ], - "settings": { - "import/resolver": { - "root-import": { - "rootPathPrefix": "@", - "rootPathSuffix": "src", - "extensions": [".js", ".ts", ".tsx", ".jsx", ".mdx"] - } - } - } -} diff --git a/nym-wallet/.eslintrc.json b/nym-wallet/.eslintrc.json new file mode 100644 index 0000000000..7f84f4b42a --- /dev/null +++ b/nym-wallet/.eslintrc.json @@ -0,0 +1,5 @@ +{ + "extends": [ + "@nymproject/eslint-config-react-typescript" + ] +} diff --git a/nym-wallet/package.json b/nym-wallet/package.json index efd4f67f7b..9f15a7617f 100644 --- a/nym-wallet/package.json +++ b/nym-wallet/package.json @@ -1,5 +1,5 @@ { - "name": "tauri-app", + "name": "@nymproject/nym-wallet-app", "version": "1.0.0", "main": "index.js", "license": "MIT", @@ -9,7 +9,9 @@ "tauri:dev": "yarn tauri dev", "tauri:build": "yarn tauri build", "dev": "yarn run webpack:dev & yarn run tauri:dev", - "build": "run-s webpack:prod tauri:build" + "build": "run-s webpack:prod tauri:build", + "lint": "eslint src", + "lint:fix": "eslint src --fix" }, "dependencies": { "@babel/preset-typescript": "^7.15.0",