1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-12-25 00:18:07 +00:00

lint everything

This commit is contained in:
Vladimir Volek 2019-04-02 17:41:28 +02:00
parent 5696638a94
commit 6a7576b546
10 changed files with 27 additions and 34 deletions

View File

@ -3,6 +3,7 @@ build
coverage
cache/**
node_modules
scripts/solidity/**
src/flowtype/npm
scripts/solidity/.*
**/_old/*

View File

@ -2,6 +2,7 @@ public
build
coverage
cache/**
scripts/solidity/**
node_modules
src/flowtype/npm
scripts/solidity/.*

View File

@ -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,
};
};
};

View File

@ -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',
},

View File

@ -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:*",

View File

@ -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)));

View File

@ -23,4 +23,4 @@ describe('Dashboard page', () => {
.should('be.visible')
.matchImageSnapshot();
});
});
});

View File

@ -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);
};
};

View File

@ -3,4 +3,4 @@ import { initSeedAllDevice } from 'trezor-bridge-communicator';
(async () => {
await initSeedAllDevice();
})();
})();

View File

@ -3,4 +3,4 @@ import './commands';
beforeEach(() => {
window.localStorage.setItem('/betaModalPrivacy', true);
});
});