1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-12-26 00:48:35 +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 coverage
cache/** cache/**
node_modules node_modules
scripts/solidity/**
src/flowtype/npm src/flowtype/npm
scripts/solidity/.* scripts/solidity/.*
**/_old/* **/_old/*

View File

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

View File

@ -1,4 +1,4 @@
module.exports = (api) => { module.exports = api => {
// api.cache.forever(); // api.cache.forever();
const presets = [ const presets = [
@ -27,13 +27,9 @@ module.exports = (api) => {
[ [
'module-resolver', 'module-resolver',
{ {
root: [ root: ['./src'],
'./src',
],
alias: { alias: {
public: [ public: ['./public'],
'./public',
],
}, },
}, },
], ],
@ -45,15 +41,13 @@ module.exports = (api) => {
} }
if (api.env('translations')) { if (api.env('translations')) {
plugins.push( plugins.push([
[
'react-intl', 'react-intl',
{ {
messagesDir: './translations/extractedMessages/', messagesDir: './translations/extractedMessages/',
extractSourceLocation: true, extractSourceLocation: true,
}, },
], ]);
);
} }
return { return {

View File

@ -11,10 +11,7 @@ module.exports = {
'utils/promiseUtils.js', 'utils/promiseUtils.js',
'utils/networkUtils.js', 'utils/networkUtils.js',
], ],
collectCoverageFrom: [ collectCoverageFrom: ['utils/**.js', 'reducers/utils/**.js'],
'utils/**.js',
'reducers/utils/**.js',
],
// coverageThreshold: { // coverageThreshold: {
// global: { // global: {
// branches: 100, // branches: 100,
@ -23,9 +20,7 @@ module.exports = {
// statements: 100, // statements: 100,
// }, // },
// }, // },
setupFiles: [ setupFiles: ['./support/setupJest.js'],
'./support/setupJest.js',
],
transform: { transform: {
'^.+\\.jsx?$': 'babel-jest', '^.+\\.jsx?$': 'babel-jest',
}, },

View File

@ -19,7 +19,7 @@
"translations:download": "yarn ttm build-translations && sleep 1 && yarn ttm export-translations", "translations:download": "yarn ttm build-translations && sleep 1 && yarn ttm export-translations",
"flow": "flow check src", "flow": "flow check src",
"lint": "run-s lint:*", "lint": "run-s lint:*",
"lint:js": "npx eslint ./src ./webpack", "lint:js": "npx eslint .",
"lint:css": "npx stylelint './src/**/*.js'", "lint:css": "npx stylelint './src/**/*.js'",
"lint-fix": "npx eslint ./src ./webpack --fix", "lint-fix": "npx eslint ./src ./webpack --fix",
"test": "run-s test:*", "test": "run-s test:*",

View File

@ -19,7 +19,11 @@ const app = express();
const PORT = process.env.PORT || 8080; const PORT = process.env.PORT || 8080;
// Setup logger // 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 // Serve static assets
app.use(express.static(path.resolve(__dirname, '..', 'build', commander.buildType))); app.use(express.static(path.resolve(__dirname, '..', 'build', commander.buildType)));

View File

@ -1,7 +1,5 @@
const { const { addMatchImageSnapshotPlugin } = require('cypress-image-snapshot/plugin');
addMatchImageSnapshotPlugin,
} = require('cypress-image-snapshot/plugin');
module.exports = (on) => { module.exports = on => {
addMatchImageSnapshotPlugin(on); addMatchImageSnapshotPlugin(on);
}; };