lint everything

pull/487/head
Vladimir Volek 5 years ago
parent 5696638a94
commit 6a7576b546

@ -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/*

@ -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/.*

@ -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 {

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

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

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

@ -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);
}; };
Loading…
Cancel
Save