diff --git a/.eslintrc.js b/.eslintrc.js index ac234da8ea55..3f7e1c565e54 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,110 +1,132 @@ module.exports = { - root: true, - parser: 'babel-eslint', - plugins: ['prettier', 'testing-library'], - env: { - es6: true, - browser: true, - amd: true, - mocha: true, - jest: true, - jquery: true, - jasmine: true, - }, - globals: { - dataLayer: true, - texts_json: false, - }, - rules: { - camelcase: 0, - // semi : ['error', 'always'], - 'array-callback-return': 0, - 'arrow-body-style': 0, - 'brace-style': ['error', '1tbs', { allowSingleLine: true }], - curly: 0, - // 'comma-dangle' : ['error', 'always-multiline'], - 'eol-last': ['error', 'always'], - 'func-names': ['error', 'never'], - 'key-spacing': 0, - 'max-classes-per-file': ['warn', 2], - // 'keyword-spacing' : ['error', { after: true }], - 'lines-between-class-members': 0, - indent: 0, - // 'max-len' : ['error', { code: 120, 'ignoreComments': true }], - // 'no-extra-semi' : 'error', - 'no-console': 'error', - 'no-else-return': ['error', { allowElseIf: true }], - 'no-multi-assign': 0, - // 'no-multi-spaces' : [2, { exceptions: { 'BinaryExpression': true, 'VariableDeclarator': true, 'ImportDeclaration': true } }], - 'no-param-reassign': ['error', { props: false }], - 'no-restricted-globals': 0, - 'no-script-url': 0, - // 'no-trailing-spaces' : ['error', { skipBlankLines: true }], - // 'object-curly-spacing' : ['error', 'always', { arraysInObjects: true, objectsInObjects: true }], - 'one-var': ['error', { initialized: 'never', uninitialized: 'always' }], - 'prefer-destructuring': 0, - quotes: 0, - // 'space-in-parens' : ['error', 'never'], - 'space-infix-ops': 'error', - // 'space-unary-ops' : 'error', - // 'no-multiple-empty-lines' : ['error', { 'max': 1, 'maxEOF': 1 }], + root: true, + parser: '@babel/eslint-parser', + plugins: ['prettier', 'testing-library'], + env: { + es6: true, + browser: true, + amd: true, + mocha: true, + jest: true, + jquery: true, + jasmine: true, + }, + globals: { + dataLayer: true, + texts_json: false, + }, + rules: { + camelcase: 0, + // semi : ['error', 'always'], + 'array-callback-return': 0, + 'arrow-body-style': 0, + 'brace-style': ['error', '1tbs', { allowSingleLine: true }], + curly: 0, + // 'comma-dangle' : ['error', 'always-multiline'], + 'eol-last': ['error', 'always'], + 'func-names': ['error', 'never'], + 'key-spacing': 0, + 'max-classes-per-file': ['warn', 2], + // 'keyword-spacing' : ['error', { after: true }], + 'lines-between-class-members': 0, + indent: 0, + // 'max-len' : ['error', { code: 120, 'ignoreComments': true }], + // 'no-extra-semi' : 'error', + 'no-console': 'error', + 'no-else-return': ['error', { allowElseIf: true }], + 'no-multi-assign': 0, + // 'no-multi-spaces' : [2, { exceptions: { 'BinaryExpression': true, 'VariableDeclarator': true, 'ImportDeclaration': true } }], + 'no-param-reassign': ['error', { props: false }], + 'no-restricted-globals': 0, + 'no-script-url': 0, + // 'no-trailing-spaces' : ['error', { skipBlankLines: true }], + // 'object-curly-spacing' : ['error', 'always', { arraysInObjects: true, objectsInObjects: true }], + 'one-var': ['error', { initialized: 'never', uninitialized: 'always' }], + 'prefer-destructuring': 0, + quotes: 0, + // 'space-in-parens' : ['error', 'never'], + 'space-infix-ops': 'error', + // 'space-unary-ops' : 'error', + // 'no-multiple-empty-lines' : ['error', { 'max': 1, 'maxEOF': 1 }], - // import rules - 'import/no-extraneous-dependencies': ['error', { 'devDependencies': ['**/__tests__/**/*.js', '**/test*.js', '**/*.test.js*', '**/*.spec.js', '**/*.spec.jsx'] }], + // import rules + 'import/no-extraneous-dependencies': [ + 'error', + { + devDependencies: [ + '**/__tests__/**/*.js', + '**/test*.js', + '**/*.test.js*', + '**/*.spec.js', + '**/*.spec.jsx', + ], + }, + ], - 'import/no-useless-path-segments': 'error', - 'import/order': [ - 0, // TODO: we should turn this to error after we sorted our import orders. - { - groups: [['builtin', 'external'], 'internal', 'sibling', 'parent'], - 'newlines-between': 'ignore', - }, - ], - 'import/prefer-default-export': 0, - 'import/extensions': ['warn', 'never', { jsx: 'always', json: 'always' }], - 'no-sequences': ['warn'], - 'import/no-unresolved': [ - 2, - { ignore: ['@deriv/components', '@deriv/shared'] }, - ], + 'import/no-useless-path-segments': 'error', + 'import/order': [ + 0, // TODO: we should turn this to error after we sorted our import orders. + { + groups: [['builtin', 'external'], 'internal', 'sibling', 'parent'], + 'newlines-between': 'ignore', + }, + ], + 'import/prefer-default-export': 0, + 'import/extensions': ['warn', 'never', { jsx: 'always', json: 'always' }], + 'no-sequences': ['warn'], + 'import/no-unresolved': [2, { ignore: ['@deriv/components', '@deriv/shared'] }], - // react rules - // 'jsx-quotes' : ['error', 'prefer-single'], - // 'react/jsx-closing-bracket-location': ['error', { selfClosing: 'line-aligned', nonEmpty: 'line-aligned' }], - // 'react/jsx-closing-tag-location' : 'error', - // 'react/jsx-first-prop-new-line' : ['error', 'multiline-multiprop'], - // 'react/jsx-indent' : ['error', 4], - // 'react/jsx-indent-props' : ['error', 4], - // 'react/jsx-max-props-per-line' : ['error', { when: 'multiline' }], - // 'react/jsx-tag-spacing' : ['error', { closingSlash: 'never', beforeSelfClosing: 'always' }], - 'react/prop-types': 0, - 'react/self-closing-comp': 'error', - // 'react/sort-prop-types' : ['error', { ignoreCase: true, sortShapeProp: true }], - }, - extends: [ - 'prettier', - 'prettier/react', - 'airbnb-base', - 'binary', - 'plugin:react/recommended', - 'plugin:react-hooks/recommended', - 'plugin:jest-dom/recommended', - ], - parserOptions: { - ecmaVersion: 6, - ecmaFeatures: { - jsx: true, + // react rules + // 'jsx-quotes' : ['error', 'prefer-single'], + // 'react/jsx-closing-bracket-location': ['error', { selfClosing: 'line-aligned', nonEmpty: 'line-aligned' }], + // 'react/jsx-closing-tag-location' : 'error', + // 'react/jsx-first-prop-new-line' : ['error', 'multiline-multiprop'], + // 'react/jsx-indent' : ['error', 4], + // 'react/jsx-indent-props' : ['error', 4], + // 'react/jsx-max-props-per-line' : ['error', { when: 'multiline' }], + // 'react/jsx-tag-spacing' : ['error', { closingSlash: 'never', beforeSelfClosing: 'always' }], + 'react/prop-types': 0, + 'react/self-closing-comp': 'error', + // 'react/sort-prop-types' : ['error', { ignoreCase: true, sortShapeProp: true }], }, - }, - settings: { - react: { - version: '16', + extends: [ + 'prettier', + 'prettier/react', + 'airbnb-base', + 'binary', + 'plugin:react/recommended', + 'plugin:react-hooks/recommended', + 'plugin:jest-dom/recommended', + ], + parserOptions: { + requireConfigFile: false, + ecmaVersion: 8, + babelOptions: { + presets: ['@babel/preset-react', '@babel/preset-typescript'], + plugins: [ + ['@babel/plugin-proposal-decorators', { legacy: true }], + ['@babel/plugin-proposal-class-properties', { loose: true }], + '@babel/plugin-proposal-export-default-from', + '@babel/plugin-proposal-object-rest-spread', + '@babel/plugin-proposal-export-namespace-from', + '@babel/plugin-syntax-dynamic-import', + '@babel/plugin-proposal-optional-chaining', + '@babel/plugin-proposal-nullish-coalescing-operator', + ], + }, + ecmaFeatures: { + jsx: true, + }, }, - }, - overrides: [ - { - files: ['**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[jt]s?(x)'], - extends: ['plugin:testing-library/react'], + settings: { + react: { + version: '16', + }, }, - ], + overrides: [ + { + files: ['**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[jt]s?(x)'], + extends: ['plugin:testing-library/react'], + }, + ], }; diff --git a/.husky/pre-commit b/.husky/pre-commit index b6f9b5ae7168..146c0dfd0def 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1,4 @@ #!/bin/sh . "$(dirname "$0")/_/husky.sh" -npm run prettify +npx lint-staged --allow-empty diff --git a/.lintstagedrc.json b/.lintstagedrc.json new file mode 100644 index 000000000000..228685f7f51b --- /dev/null +++ b/.lintstagedrc.json @@ -0,0 +1,5 @@ +{ + "*.{js,jsx,ts,tsx,md,html,css,scss}": "prettier --write", + "*.{js,jsx,ts,tsx}": "npx eslint --fix", + "*.{css,scss}": "npx stylelint --fix" +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index a74da39ffb7c..3d792ae45ba4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,6 +18,7 @@ }, "devDependencies": { "@babel/core": "^7.12.10", + "@babel/eslint-parser": "^7.17.0", "@babel/plugin-proposal-class-properties": "^7.12.1", "@babel/plugin-proposal-decorators": "^7.12.12", "@babel/plugin-proposal-export-default-from": "^7.12.1", @@ -33,7 +34,6 @@ "@testing-library/react": "^12.0.0", "@typescript-eslint/eslint-plugin": "^5.8.0", "@typescript-eslint/parser": "^5.8.0", - "babel-eslint": "^10.1.0", "babel-polyfill": "^6.26.0", "chai": "^4.2.0", "eslint": "^7.18.0", @@ -129,6 +129,33 @@ "url": "https://opencollective.com/babel" } }, + "node_modules/@babel/eslint-parser": { + "version": "7.17.0", + "resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.17.0.tgz", + "integrity": "sha512-PUEJ7ZBXbRkbq3qqM/jZ2nIuakUBqCYc7Qf52Lj7dlZ6zERnqisdHioL0l4wwQZnmskMeasqUNzLBFKs3nylXA==", + "dev": true, + "dependencies": { + "eslint-scope": "^5.1.1", + "eslint-visitor-keys": "^2.1.0", + "semver": "^6.3.0" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || >=14.0.0" + }, + "peerDependencies": { + "@babel/core": ">=7.11.0", + "eslint": "^7.5.0 || ^8.0.0" + } + }, + "node_modules/@babel/eslint-parser/node_modules/eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, "node_modules/@babel/generator": { "version": "7.17.0", "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.0.tgz", @@ -6919,36 +6946,6 @@ "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", "dev": true }, - "node_modules/babel-eslint": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-10.1.0.tgz", - "integrity": "sha512-ifWaTHQ0ce+448CYop8AdrQiBsGrnC+bMgfyKFdi6EsPLTAWG+QfyDeM6OH+FmWnKvEq5NnBMLvlBUPKQZoDSg==", - "deprecated": "babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.7.0", - "@babel/traverse": "^7.7.0", - "@babel/types": "^7.7.0", - "eslint-visitor-keys": "^1.0.0", - "resolve": "^1.12.0" - }, - "engines": { - "node": ">=6" - }, - "peerDependencies": { - "eslint": ">= 4.12.1" - } - }, - "node_modules/babel-eslint/node_modules/eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/babel-jest": { "version": "27.5.1", "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-27.5.1.tgz", @@ -24911,6 +24908,25 @@ "semver": "^6.3.0" } }, + "@babel/eslint-parser": { + "version": "7.17.0", + "resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.17.0.tgz", + "integrity": "sha512-PUEJ7ZBXbRkbq3qqM/jZ2nIuakUBqCYc7Qf52Lj7dlZ6zERnqisdHioL0l4wwQZnmskMeasqUNzLBFKs3nylXA==", + "dev": true, + "requires": { + "eslint-scope": "^5.1.1", + "eslint-visitor-keys": "^2.1.0", + "semver": "^6.3.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true + } + } + }, "@babel/generator": { "version": "7.17.0", "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.0.tgz", @@ -30201,28 +30217,6 @@ "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", "dev": true }, - "babel-eslint": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-10.1.0.tgz", - "integrity": "sha512-ifWaTHQ0ce+448CYop8AdrQiBsGrnC+bMgfyKFdi6EsPLTAWG+QfyDeM6OH+FmWnKvEq5NnBMLvlBUPKQZoDSg==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.7.0", - "@babel/traverse": "^7.7.0", - "@babel/types": "^7.7.0", - "eslint-visitor-keys": "^1.0.0", - "resolve": "^1.12.0" - }, - "dependencies": { - "eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true - } - } - }, "babel-jest": { "version": "27.5.1", "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-27.5.1.tgz", diff --git a/package.json b/package.json index 9cdeca1511cc..2d16162b0e7f 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ }, "devDependencies": { "@babel/core": "^7.12.10", + "@babel/eslint-parser": "^7.17.0", "@babel/plugin-proposal-class-properties": "^7.12.1", "@babel/plugin-proposal-decorators": "^7.12.12", "@babel/plugin-proposal-export-default-from": "^7.12.1", @@ -16,12 +17,11 @@ "@babel/plugin-proposal-unicode-property-regex": "^7.16.7", "@babel/plugin-syntax-dynamic-import": "^7.8.3", "@babel/preset-env": "^7.12.11", - "@babel/preset-react": "^7.12.10", + "@babel/preset-react": "^7.16.7", "@jest/globals": "^26.5.3", "@testing-library/react": "^12.0.0", "@typescript-eslint/eslint-plugin": "^5.8.0", "@typescript-eslint/parser": "^5.8.0", - "babel-eslint": "^10.1.0", "babel-polyfill": "^6.26.0", "chai": "^4.2.0", "eslint": "^7.18.0", diff --git a/packages/account/package.json b/packages/account/package.json index 372ea891b947..febcc542374d 100644 --- a/packages/account/package.json +++ b/packages/account/package.json @@ -46,12 +46,14 @@ "react-router-dom": "^5.2.0" }, "devDependencies": { + "@babel/eslint-parser": "^7.17.0", + "@babel/preset-react": "^7.16.7", "@jest/globals": "^26.5.3", "@testing-library/react": "^12.0.0", - "babel-eslint": "^10.1.0", "babel-loader": "^8.1.0", "clean-webpack-plugin": "^3.0.0", "css-loader": "^5.0.1", + "css-minimizer-webpack-plugin": "^3.0.1", "eslint-config-airbnb-base": "^14.2.1", "eslint-config-binary": "^1.0.2", "eslint-config-prettier": "^7.2.0", @@ -65,7 +67,6 @@ "jest": "^26.4.2", "mini-css-extract-plugin": "^1.3.4", "node-sass": "^4.12.0", - "css-minimizer-webpack-plugin": "^3.0.1", "postcss-loader": "^6.2.1", "postcss-preset-env": "^7.4.3", "postcss-scss": "^4.0.3", diff --git a/packages/appstore/package.json b/packages/appstore/package.json index d5472d9693ff..06a91abe8637 100644 --- a/packages/appstore/package.json +++ b/packages/appstore/package.json @@ -44,6 +44,8 @@ "react-router-dom": "^5.2.0" }, "devDependencies": { + "@babel/eslint-parser": "^7.17.0", + "@babel/preset-react": "^7.16.7", "@deriv/publisher": "^0.0.1-beta4", "@types/classnames": "^2.2.11", "@types/object.fromentries": "^2.0.0", @@ -54,11 +56,11 @@ "concurrently": "^5.3.0", "cross-env": "^5.2.0", "css-loader": "^5.0.1", + "css-minimizer-webpack-plugin": "^3.0.1", "fork-ts-checker-webpack-plugin": "^6.5.0", "lint-staged": "^10.4.0", "mini-css-extract-plugin": "^1.3.4", "node-sass": "^4.12.0", - "css-minimizer-webpack-plugin": "^3.0.1", "postcss-loader": "^6.2.1", "postcss-preset-env": "^7.4.3", "postcss-scss": "^4.0.3", diff --git a/packages/bot-skeleton/package.json b/packages/bot-skeleton/package.json index a0db0e720350..15193a21bd86 100644 --- a/packages/bot-skeleton/package.json +++ b/packages/bot-skeleton/package.json @@ -22,27 +22,28 @@ "author": "Binary.com", "license": "MIT", "devDependencies": { - "babel-eslint": "^10.1.0", - "eslint-config-prettier": "^7.2.0", - "eslint-plugin-prettier": "^3.3.1", + "@babel/eslint-parser": "^7.17.0", + "@babel/preset-react": "^7.16.7", + "chai": "^4.2.0", + "deep-diff": "^1.0.2", "eslint-config-airbnb-base": "^14.2.1", "eslint-config-binary": "^1.0.2", - "eslint-plugin-react": "^7.22.0", - "eslint-plugin-react-hooks": "^4.2.0", + "eslint-config-prettier": "^7.2.0", "eslint-plugin-import": "^2.23.4", - "chai": "^4.2.0", - "deep-diff": "^1.0.2" + "eslint-plugin-prettier": "^3.3.1", + "eslint-plugin-react": "^7.22.0", + "eslint-plugin-react-hooks": "^4.2.0" }, "dependencies": { "@deriv/deriv-api": "^1.0.8", "@deriv/indicators": "^1.0.0", + "@deriv/js-interpreter": "^3.0.0", "@deriv/shared": "^1.0.0", "@deriv/translations": "^1.0.0", "binary-utils": "^4.23.0", "blockly": "3.20191014.4", "file-saver": "^2.0.2", "immutable": "^3.8.2", - "@deriv/js-interpreter": "^3.0.0", "localforage": "^1.9.0", "lz-string": "^1.4.4", "redux": "^4.0.1", diff --git a/packages/bot-web-ui/package.json b/packages/bot-web-ui/package.json index 5cf669cd58e2..241298438bb2 100644 --- a/packages/bot-web-ui/package.json +++ b/packages/bot-web-ui/package.json @@ -35,7 +35,8 @@ "author": "Binary.com", "license": "MIT", "devDependencies": { - "babel-eslint": "^10.1.0", + "@babel/eslint-parser": "^7.17.0", + "@babel/preset-react": "^7.16.7", "babel-loader": "^8.1.0", "chai": "^4.2.0", "clean-webpack-plugin": "^3.0.0", diff --git a/packages/bot-web-ui/src/components/toolbox/toolbox-items.jsx b/packages/bot-web-ui/src/components/toolbox/toolbox-items.jsx index 08d2f4cb39cb..2732bf1b7139 100644 --- a/packages/bot-web-ui/src/components/toolbox/toolbox-items.jsx +++ b/packages/bot-web-ui/src/components/toolbox/toolbox-items.jsx @@ -459,7 +459,7 @@ export const ToolboxItems = ReactDomServer.renderToStaticMarkup( - yyyy-mm-dd hh:mm:ss + yyyy-mm-dd hh:mm:ss diff --git a/packages/cashier/package.json b/packages/cashier/package.json index 83854eb6d71e..a34b41aeddcb 100644 --- a/packages/cashier/package.json +++ b/packages/cashier/package.json @@ -58,6 +58,7 @@ }, "devDependencies": { "@babel/core": "^7.12.10", + "@babel/eslint-parser": "^7.17.0", "@babel/plugin-proposal-class-properties": "^7.12.1", "@babel/plugin-proposal-decorators": "^7.12.12", "@babel/plugin-proposal-export-default-from": "^7.12.1", @@ -67,15 +68,16 @@ "@babel/plugin-proposal-optional-chaining": "^7.12.7", "@babel/plugin-syntax-dynamic-import": "^7.8.3", "@babel/preset-env": "^7.12.11", - "@babel/preset-react": "^7.12.10", + "@babel/preset-react": "^7.16.7", + "@testing-library/react": "^12.0.0", "babel-loader": "^8.1.0", "clean-webpack-plugin": "^3.0.0", "copy-webpack-plugin": "^9.0.1", "css-loader": "^5.0.1", + "css-minimizer-webpack-plugin": "^3.0.1", "file-loader": "^6.2.0", "mini-css-extract-plugin": "^1.3.4", "node-sass": "^4.12.0", - "css-minimizer-webpack-plugin": "^3.0.1", "postcss-loader": "^6.2.1", "postcss-preset-env": "^7.4.3", "postcss-scss": "^4.0.3", @@ -83,7 +85,6 @@ "resolve-url-loader": "^3.1.2", "sass-loader": "^10.1.1", "sass-resources-loader": "^2.1.1", - "@testing-library/react": "^12.0.0", "webpack": "^5.46.0", "webpack-cli": "^4.7.2", "webpack-manifest-plugin": "^4.0.2", diff --git a/packages/components/package.json b/packages/components/package.json index b5fdc2d86466..15db8733e283 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -28,6 +28,8 @@ "author": "Deriv", "license": "Apache-2.0", "devDependencies": { + "@babel/eslint-parser": "^7.17.0", + "@babel/preset-react": "^7.16.7", "@storybook/addon-actions": "^5.2.4", "@storybook/addon-info": "^5.2.4", "@storybook/addon-links": "^5.2.4", @@ -38,7 +40,6 @@ "@storybook/source-loader": "^5.2.4", "@storybook/storybook-deployer": "^2.8.1", "@testing-library/react": "^12.0.0", - "babel-eslint": "^10.1.0", "babel-loader": "^8.1.0", "copy-webpack-plugin": "^9.0.1", "copy-webpack-plugin-v6": "npm:copy-webpack-plugin@6", diff --git a/packages/core/package.json b/packages/core/package.json index 0cc10af96e3a..b935d25a6615 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -35,7 +35,8 @@ "homepage": "https://github.com/binary-com/deriv-app", "devDependencies": { "@babel/plugin-proposal-unicode-property-regex": "^7.16.7", - "babel-eslint": "^10.1.0", + "@babel/eslint-parser": "^7.17.0", + "@babel/preset-react": "^7.16.7", "babel-loader": "^8.1.0", "chai": "^4.2.0", "circular-dependency-plugin": "^5.2.2", diff --git a/packages/indicators/package.json b/packages/indicators/package.json index 0d7e6919b75f..fc2376c01d7b 100644 --- a/packages/indicators/package.json +++ b/packages/indicators/package.json @@ -32,13 +32,14 @@ "url": "https://github.com/binary-com/deriv-app/issues" }, "devDependencies": { + "@babel/eslint-parser": "^7.17.0", "@babel/preset-env": "^7.12.11", - "babel-eslint": "^10.1.0", - "eslint-plugin-prettier": "^3.3.1", - "eslint-config-prettier": "^7.2.0", + "@babel/preset-react": "^7.16.7", "eslint-config-airbnb-base": "^14.2.1", "eslint-config-binary": "^1.0.2", - "eslint-plugin-import": "^2.23.4" + "eslint-config-prettier": "^7.2.0", + "eslint-plugin-import": "^2.23.4", + "eslint-plugin-prettier": "^3.3.1" }, "dependencies": { "@deriv/shared": "^1.0.0", diff --git a/packages/p2p/package.json b/packages/p2p/package.json index 49b4e0b25ad8..60b0d805ffca 100644 --- a/packages/p2p/package.json +++ b/packages/p2p/package.json @@ -51,6 +51,7 @@ "sendbird": "~3.0.137" }, "devDependencies": { + "@babel/eslint-parser": "^7.17.0", "@babel/plugin-proposal-class-properties": "^7.12.1", "@babel/plugin-proposal-decorators": "^7.12.12", "@babel/plugin-proposal-export-default-from": "^7.12.1", @@ -61,10 +62,9 @@ "@babel/plugin-proposal-unicode-property-regex": "^7.16.7", "@babel/plugin-syntax-dynamic-import": "^7.8.3", "@babel/preset-env": "^7.12.11", - "@babel/preset-react": "^7.12.10", + "@babel/preset-react": "^7.16.7", "@deriv/publisher": "0.0.1-beta4", "babel-core": "^6.26.3", - "babel-eslint": "^10.1.0", "babel-loader": "^8.1.0", "chai": "^4.2.0", "commander": "^3.0.2", diff --git a/packages/publisher/package.json b/packages/publisher/package.json index 8caaf6a75e3b..48e903d80c6e 100644 --- a/packages/publisher/package.json +++ b/packages/publisher/package.json @@ -27,5 +27,9 @@ "publish_package": "node ./index.js prepublish && npm publish; node ./index.js postpublish" }, "author": "Deriv.com", - "license": "ISC" + "license": "ISC", + "devDependencies": { + "@babel/eslint-parser": "^7.17.0", + "@babel/preset-react": "^7.16.7" + } } diff --git a/packages/shared/package.json b/packages/shared/package.json index 88b381a5e1f7..a6629244c835 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -30,6 +30,8 @@ "url": "https://github.com/binary-com/deriv-app/issues" }, "devDependencies": { + "@babel/eslint-parser": "^7.17.0", + "@babel/preset-react": "^7.16.7", "chai": "^4.2.0", "jsdom": "^16.2.1", "moment": "^2.24.0" @@ -38,9 +40,9 @@ "canvas-toBlob": "^1.0.0", "extend": "^3.0.2", "js-cookie": "^2.2.1", + "moment": "^2.24.0", "object.fromentries": "^2.0.0", "react": "^16.14.0", - "moment": "^2.24.0", "react-loadable": "^5.5.0" } } diff --git a/packages/trader/package.json b/packages/trader/package.json index b04d2a4dfbee..5db096cf9a88 100644 --- a/packages/trader/package.json +++ b/packages/trader/package.json @@ -35,7 +35,8 @@ }, "homepage": "https://github.com/binary-com/deriv-app", "devDependencies": { - "babel-eslint": "^10.1.0", + "@babel/eslint-parser": "^7.17.0", + "@babel/preset-react": "^7.16.7", "babel-loader": "^8.1.0", "chai": "^4.2.0", "circular-dependency-plugin": "^5.2.2", diff --git a/packages/translations/package.json b/packages/translations/package.json index 74317ae448f7..7c24a3ecce19 100644 --- a/packages/translations/package.json +++ b/packages/translations/package.json @@ -40,6 +40,8 @@ "react-i18next": "^11.11.0" }, "devDependencies": { + "@babel/eslint-parser": "^7.17.0", + "@babel/preset-react": "^7.16.7", "chai": "^4.2.0", "cross-env": "^5.2.0", "mocha": "^7.1.1",