Skip to content

Commit

Permalink
build(config): Switch to @box/frontend package for configs (#1043)
Browse files Browse the repository at this point in the history
  • Loading branch information
jstoffan authored and mergify[bot] committed Jul 18, 2019
1 parent ec3957d commit 1b9cc8e
Show file tree
Hide file tree
Showing 167 changed files with 4,272 additions and 3,169 deletions.
136 changes: 0 additions & 136 deletions .eslintrc

This file was deleted.

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

module.exports = {
extends: [eslintrc],
globals: {
__: false,
__I18N__: false,
ActiveXObject: false,
DocumentTouch: false,
Assert: false,
fixture: false,
PDFJS: false,
sinon: false,
},
rules: {
'class-methods-use-this': 0, // fixme
'import/no-cycle': 0, // fixme
'import/no-extraneous-dependencies': 0, // fixme
'no-underscore-dangle': 0, // fixme
'prefer-destructuring': ['error', { object: true, array: false }], // fixme
},
};
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');
23 changes: 0 additions & 23 deletions .stylelintrc

This file was deleted.

14 changes: 7 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
language: node_js
node_js:
- '10'
cache: yarn
cache:
yarn: true
directories:
- node_modules
- ~/.cache/Cypress
before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.13.0
- export PATH=$HOME/.yarn/bin:$PATH
jobs:
include:
- name: "Code Lint"
script: yarn lint
- name: "Unit Tests"
script: yarn test
- name: "Build & Test"
script: commitlint-travis && yarn lint && npm-run-all clean build:i18n build:ci test
- name: "E2E Tests"
script: yarn test:e2e
- name: "Build"
script: npm-run-all clean build:i18n build:ci
71 changes: 1 addition & 70 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -1,70 +1 @@
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
]
}
};
module.exports = require('@box/frontend/commitlint/commitlint.config.js'); // eslint-disable-line import/no-extraneous-dependencies
56 changes: 32 additions & 24 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
"url": "git@github.com:box/box-content-preview.git"
},
"devDependencies": {
"@commitlint/cli": "^5.2.0",
"@box/frontend": "^1.4.0",
"@commitlint/cli": "^7.2.1",
"@commitlint/config-conventional": "7.1.2",
"@commitlint/travis-cli": "^8.1.0",
"autoprefixer": "^7.2.1",
"axios": "^0.19.0",
"babel-core": "^6.26.0",
Expand All @@ -30,22 +33,27 @@
"box-react-ui": "^22.7.0",
"chai": "^4.2.0",
"chai-dom": "^1.8.1",
"conventional-changelog-cli": "^1.3.5",
"conventional-changelog-cli": "^2.0.5",
"conventional-github-releaser": "^2.0.0",
"create-react-class": "^15.6.2",
"css-loader": "^0.28.7",
"cssnano-cli": "^1.0.5",
"cypress": "^3.1.5",
"eslint": "^4.12.1",
"eslint-config-airbnb": "^16.1.0",
"eslint-config-prettier": "^2.9.0",
"eslint": "^4.19.1",
"eslint-config-airbnb": "^17.1.0",
"eslint-config-prettier": "^3.0.1",
"eslint-import-resolver-webpack": "^0.8.3",
"eslint-plugin-babel": "^4.1.1",
"eslint-plugin-babel": "^5.2.0",
"eslint-plugin-chai-friendly": "^0.4.1",
"eslint-plugin-cypress": "^2.2.0",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-jsx-a11y": "^6.0.2",
"eslint-plugin-react": "^7.5.1",
"eslint-plugin-cypress": "^2.2.1",
"eslint-plugin-flowtype": "^2.34.1",
"eslint-plugin-import": "^2.18.0",
"eslint-plugin-jest": "^21.21.0",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-lodash": "^5.1.0",
"eslint-plugin-prettier": "^2.6.2",
"eslint-plugin-react": "^7.8.2",
"eslint-plugin-react-hooks": "^1.6.0",
"extract-text-webpack-plugin": "3.0.2",
"file-loader": "^1.1.5",
"fscreen": "^1.0.2",
Expand All @@ -67,8 +75,8 @@
"karma-sinon-chai": "^2.0.2",
"karma-sourcemap-loader": "^0.3.7",
"karma-webpack": "^3.0.5",
"lint-staged": "^5.0.0",
"lodash": "^4.17.5",
"lint-staged": "^8.0.4",
"lodash": "^4.17.11",
"mocha": "^4.0.1",
"mock-local-storage": "^1.0.2",
"mojito-rb-gen": "^0.0.1",
Expand All @@ -79,7 +87,7 @@
"phantomjs-prebuilt": "^2.1.16",
"postcss-loader": "^2.0.9",
"postcss-sass": "^0.3.0",
"prettier": "^1.8.2",
"prettier": "^1.14.2",
"prettier-eslint-cli": "^4.4.2",
"raw-loader": "^0.5.1",
"react": "^16.7.0",
Expand All @@ -90,9 +98,9 @@
"sinon-chai": "3.3.0",
"string-replace-loader": "^1.3.0",
"style-loader": "^0.19.0",
"stylelint": "^8.3.1",
"stylelint-config-standard": "^18.0.0",
"stylelint-order": "^0.7.0",
"stylelint": "^9.5.0",
"stylelint-config-standard": "^18.2.0",
"stylelint-order": "^1.0.0",
"stylelint-scss": "^2.2.0",
"wait-on": "^3.2.0",
"webpack": "^3.10.0",
Expand Down Expand Up @@ -131,14 +139,14 @@
"upgrade:pdfjs": "./build/upgrade_pdfjs.sh && ./build/minify_pdfjs.sh"
},
"lint-staged": {
"tests/**/*.js": [
"prettier-eslint --print-width 120 --single-quote --tab-width 4 --write",
"git add"
],
"src/lib/**/*.js": [
"prettier-eslint --print-width 120 --single-quote --tab-width 4 --write",
"git add"
]
"linters": {
"*.js": ["eslint --fix", "git add"],
"*.md": ["prettier --write --parser=markdown", "git add"],
"*.json": ["prettier --write --parser=json", "git add"],
"*.html": ["prettier --write --parser=html", "git add"],
"*.scss": ["prettier --write --parser=scss", "stylelint --syntax scss --fix", "git add"],
"*.css": ["prettier --write --parser=css", "stylelint --syntax css --fix", "git add"]
}
},
"husky": {
"hooks": {
Expand Down
Loading

0 comments on commit 1b9cc8e

Please sign in to comment.