Skip to content

Commit

Permalink
build(deps): Add @box/frontend and upgrade dependencies (#380)
Browse files Browse the repository at this point in the history
  • Loading branch information
jstoffan authored Jan 10, 2020
1 parent bf2f50c commit 286e9ca
Show file tree
Hide file tree
Showing 86 changed files with 3,319 additions and 2,312 deletions.
96 changes: 0 additions & 96 deletions .eslintrc

This file was deleted.

13 changes: 13 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const eslintrc = require.resolve("@box/frontend/eslint/eslintrc.js");

module.exports = {
extends: [eslintrc],
rules: {
camelcase: 0, // fixme
"class-methods-use-this": 0, // fixme
"import/no-extraneous-dependencies": 0, // fixme
"import/no-unresolved": "off", // Allows JS files to import TS files
"prefer-destructuring": ["error", { object: true, array: false }],
"react/default-props-match-prop-types": 0
}
};
1 change: 1 addition & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('@box/frontend/prettier/prettierrc.js');
20 changes: 0 additions & 20 deletions .stylelintrc

This file was deleted.

25 changes: 19 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
# @desktop @mobile @enabled
language: node_js
node_js:
- '8'
cache: yarn
notifications:
email:
recipients:
- [email protected]
- '10'
addons:
apt:
packages:
- libgconf-2-4
cache:
yarn: true
directories:
- node_modules
- ~/.cache/Cypress
before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.19.0
- export HUSKY_SKIP_HOOKS=1
- export PATH=$HOME/.yarn/bin:$PATH
- export TZ=America/Los_Angeles
jobs:
include:
- name: "Code Lint"
Expand All @@ -15,3 +24,7 @@ jobs:
script: yarn test
- name: "E2E Tests"
script: yarn test:e2e
notifications:
email:
recipients:
- [email protected]
2 changes: 2 additions & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Root
* @box/ui-elements
14 changes: 8 additions & 6 deletions build/prod.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const workerFarm = require('worker-farm');
const locales = require('box-locales');
const locales = require('@box/languages');
const numCPUs = require('os').cpus().length;
const { execSync } = require('child_process');
const path = require('path');
Expand All @@ -11,14 +11,15 @@ let counter = 0;
const workers = workerFarm(
{
maxConcurrentWorkers: numCPUs - 2,
maxRetries: 0
maxRetries: 0,
},
require.resolve('./build_locale.js')
require.resolve('./build_locale.js'),
);

locales.forEach((locale) => {
workers(locale, (error) => {
if (++counter === bundleCount || error) { // eslint-disable-line
/* eslint-disable */
locales.forEach(locale => {
workers(locale, error => {
if (++counter === bundleCount || error) {
// terminate after all locales have been processed
workerFarm.end(workers);
}
Expand All @@ -29,3 +30,4 @@ locales.forEach((locale) => {
}
});
});
/* eslint-enable */
72 changes: 2 additions & 70 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -1,70 +1,2 @@
module.exports = {
rules: {
"body-leading-blank": [
2,
"always"
],
"body-max-length": [
0
],
"body-min-length": [
0
],
"body-tense": [
0,
"never"
],
"footer-leading-blank": [
0,
"never"
],
"header-max-length": [
2,
"always",
72
],
"header-min-length": [
2,
"always",
3
],
"subject-tense": [
0
],
"subject-max-length": [
0
],
"subject-min-length": [
0
],
"type-case": [
0,
"never"
],
"type-empty": [
2,
"never"
],
"type-enum": [
2,
"always",
[
"Fix",
"New",
"Breaking",
"Docs",
"Build",
"Upgrade",
"Chore",
"Update",
"Release"
]
],
"type-max-length": [
0
],
"type-min-length": [
0
]
}
};
// eslint-disable-next-line import/no-extraneous-dependencies
module.exports = require('@box/frontend/commitlint/commitlint.config.js');
9 changes: 9 additions & 0 deletions lint-staged.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = {
'*.js': ['eslint --fix', 'git add'],
'*.json': ['prettier --write --parser=json', 'git add'],
'*.html': ['prettier --write --parser=html', 'git add'],
'*.md': ['prettier --write --parser=markdown', 'git add'],
'*.scss': ['prettier --write --parser=scss', 'stylelint --syntax scss --fix', 'git add'],
'*.ts': ['eslint --ext=.ts --fix', 'git add'],
'*.tsx': ['eslint --ext=.tsx --fix', 'git add'],
};
Loading

0 comments on commit 286e9ca

Please sign in to comment.