diff --git a/.eslintignore b/.eslintignore index 9df7fa5d..de772550 100644 --- a/.eslintignore +++ b/.eslintignore @@ -3,6 +3,7 @@ build coverage cache/** node_modules +scripts/solidity/** src/flowtype/npm scripts/solidity/.* **/_old/* \ No newline at end of file diff --git a/.prettierignore b/.prettierignore index 9df7fa5d..fadaf825 100644 --- a/.prettierignore +++ b/.prettierignore @@ -2,6 +2,7 @@ public build coverage cache/** +scripts/solidity/** node_modules src/flowtype/npm scripts/solidity/.* diff --git a/babel.config.js b/babel.config.js index d35cc679..1a52f429 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,4 +1,4 @@ -module.exports = (api) => { +module.exports = api => { // api.cache.forever(); const presets = [ @@ -27,13 +27,9 @@ module.exports = (api) => { [ 'module-resolver', { - root: [ - './src', - ], + root: ['./src'], alias: { - public: [ - './public', - ], + public: ['./public'], }, }, ], @@ -45,19 +41,17 @@ module.exports = (api) => { } if (api.env('translations')) { - plugins.push( - [ - 'react-intl', - { - messagesDir: './translations/extractedMessages/', - extractSourceLocation: true, - }, - ], - ); + plugins.push([ + 'react-intl', + { + messagesDir: './translations/extractedMessages/', + extractSourceLocation: true, + }, + ]); } return { presets, plugins, }; -}; \ No newline at end of file +}; diff --git a/jest.config.js b/jest.config.js index a36ca0ca..8a544928 100644 --- a/jest.config.js +++ b/jest.config.js @@ -11,10 +11,7 @@ module.exports = { 'utils/promiseUtils.js', 'utils/networkUtils.js', ], - collectCoverageFrom: [ - 'utils/**.js', - 'reducers/utils/**.js', - ], + collectCoverageFrom: ['utils/**.js', 'reducers/utils/**.js'], // coverageThreshold: { // global: { // branches: 100, @@ -23,9 +20,7 @@ module.exports = { // statements: 100, // }, // }, - setupFiles: [ - './support/setupJest.js', - ], + setupFiles: ['./support/setupJest.js'], transform: { '^.+\\.jsx?$': 'babel-jest', }, diff --git a/package.json b/package.json index e043a53c..41fc7205 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "translations:download": "yarn ttm build-translations && sleep 1 && yarn ttm export-translations", "flow": "flow check src", "lint": "run-s lint:*", - "lint:js": "npx eslint ./src ./webpack", + "lint:js": "npx eslint .", "lint:css": "npx stylelint './src/**/*.js'", "lint-fix": "npx eslint ./src ./webpack --fix", "test": "run-s test:*", diff --git a/server/index.js b/server/index.js index 7bdd18cd..0ef6bea2 100644 --- a/server/index.js +++ b/server/index.js @@ -19,7 +19,11 @@ const app = express(); const PORT = process.env.PORT || 8080; // Setup logger -app.use(morgan(':remote-addr - :remote-user [:date[clf]] ":method :url HTTP/:http-version" :status :res[content-length] :response-time ms')); +app.use( + morgan( + ':remote-addr - :remote-user [:date[clf]] ":method :url HTTP/:http-version" :status :res[content-length] :response-time ms' + ) +); // Serve static assets app.use(express.static(path.resolve(__dirname, '..', 'build', commander.buildType))); diff --git a/test/integration/dashboard.spec.js b/test/integration/dashboard.spec.js index a256497b..dd2c2213 100644 --- a/test/integration/dashboard.spec.js +++ b/test/integration/dashboard.spec.js @@ -23,4 +23,4 @@ describe('Dashboard page', () => { .should('be.visible') .matchImageSnapshot(); }); -}); \ No newline at end of file +}); diff --git a/test/plugins/index.js b/test/plugins/index.js index 192877d9..031b6ac2 100644 --- a/test/plugins/index.js +++ b/test/plugins/index.js @@ -1,7 +1,5 @@ -const { - addMatchImageSnapshotPlugin, -} = require('cypress-image-snapshot/plugin'); +const { addMatchImageSnapshotPlugin } = require('cypress-image-snapshot/plugin'); -module.exports = (on) => { +module.exports = on => { addMatchImageSnapshotPlugin(on); -}; \ No newline at end of file +}; diff --git a/test/scripts/init-device.js b/test/scripts/init-device.js index acf1ce26..d23c8444 100644 --- a/test/scripts/init-device.js +++ b/test/scripts/init-device.js @@ -3,4 +3,4 @@ import { initSeedAllDevice } from 'trezor-bridge-communicator'; (async () => { await initSeedAllDevice(); -})(); \ No newline at end of file +})(); diff --git a/test/support/index.js b/test/support/index.js index 46466718..2016693b 100644 --- a/test/support/index.js +++ b/test/support/index.js @@ -3,4 +3,4 @@ import './commands'; beforeEach(() => { window.localStorage.setItem('/betaModalPrivacy', true); -}); \ No newline at end of file +});