Skip to content
This repository has been archived by the owner on Dec 2, 2019. It is now read-only.

Commit

Permalink
style: global and simpler prettier config
Browse files Browse the repository at this point in the history
this also removes precommit scripts because they were cumbersome
  • Loading branch information
sergioramos committed Mar 15, 2018
1 parent 90d6b31 commit 23ddc68
Show file tree
Hide file tree
Showing 28 changed files with 208 additions and 1,222 deletions.
4 changes: 2 additions & 2 deletions .github/COMMIT_GUIDELINES.md
Expand Up @@ -17,9 +17,9 @@ perf
refactor
revert
style
test
test
```

And where scope is one of ui-toolkit, my-joy-beta, cloudapi-gql, boilerplate, and create-instance.

*The recommended method to commit should be by running npm run commit.*
_The recommended method to commit should be by running npm run commit._
16 changes: 3 additions & 13 deletions .github/ISSUE_TEMPLATE.md
@@ -1,27 +1,17 @@
## I'm submitting a...

- [ ] bug report
- [ ] feature request
- [ ] design request
* [ ] bug report
* [ ] feature request
* [ ] design request

## What is the current behavior?



## If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem



## What is the expected behavior?



## What is the motivation / use case for changing the behavior?



## If the current behavior is a bug, please provide your browser



## Other information
12 changes: 2 additions & 10 deletions .github/PULL_REQUEST_TEMPLATE.md
@@ -1,22 +1,14 @@
**Please check if the PR fulfills these requirements**
- [ ] The commit message follows our [guidelines](https://github.com/yldio/joyent-portal/blob/master/.github/COMMIT_GUIDELINES.md)
- [ ] Tests for the changes have been added (for bug fixes / features)

* [ ] The commit message follows our [guidelines](https://github.com/yldio/joyent-portal/blob/master/.github/COMMIT_GUIDELINES.md)
* [ ] Tests for the changes have been added (for bug fixes / features)

**What kind of change does this PR introduce?** (Bug fix, feature, docs update, ...)



**Does this PR close an issue?** (If not please create one)



**What is the new behavior (if this is a feature change)?**



**Does this PR introduce a breaking change?** (What changes might users need to make in their application due to this PR?)



**Other information**
15 changes: 9 additions & 6 deletions .licensesrc.json
@@ -1,11 +1,14 @@
{
"ignoreDevDependencies": true,
"allowedPackages": [{
"name": "colors",
"extraFieldsForDocumentation": "Licence is MIT, but was not found by tool: https://github.com/Marak/colors.js/blob/v0.5.1/MIT-LICENSE.txt",
"date": "17 January 2017",
"reason": "MIT Licenced"
}],
"allowedPackages": [
{
"name": "colors",
"extraFieldsForDocumentation":
"Licence is MIT, but was not found by tool: https://github.com/Marak/colors.js/blob/v0.5.1/MIT-LICENSE.txt",
"date": "17 January 2017",
"reason": "MIT Licenced"
}
],
"allowedLicenses": [
"CC-BY-4.0",
"CC0-1.0",
Expand Down
24 changes: 24 additions & 0 deletions .prettierignore
@@ -0,0 +1,24 @@
.git/*
.DS_Store

license
yarn.lock
.travis.yml

.yarnclean
.eslintignore
.prettierignore
.npmignore
.gitignore
.dockerignore

dist
build

*.ico
*.html
*.log
*.svg
*.map
*.png
*.snap
31 changes: 31 additions & 0 deletions .prettierrc
@@ -0,0 +1,31 @@
{
"bracketSpacing": true,
"jsxBracketSameLine": false,
"printWidth": 80,
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "none",
"useTabs": false,
"overrides": [
{
"files": [
".prettierrc",
".eslintrc",
".babelrc",
".tern-project",
".stylelintrc",
".lighthouserc"
],
"options": {
"parser": "json"
}
},
{
"files": ["package.json"],
"options": {
"printWidth": 180
}
}
]
}
7 changes: 2 additions & 5 deletions .tern-project
@@ -1,8 +1,5 @@
{
"libs": [
"ecmascript",
"browser"
],
"libs": ["ecmascript", "browser"],
"plugins": {
"doc_comment": true,
"local-scope": true,
Expand All @@ -12,4 +9,4 @@
"configPath": "./webpack/index.js"
}
}
}
}
28 changes: 14 additions & 14 deletions .vscode/launch.json
@@ -1,15 +1,15 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:3069/",
"webRoot": "${workspaceRoot}"
}
]
}
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:3069/",
"webRoot": "${workspaceRoot}"
}
]
}
31 changes: 5 additions & 26 deletions package.json
Expand Up @@ -16,29 +16,17 @@
"build:test": "lerna run build:test --parallel --stream",
"test:run": "lerna run test --parallel --stream",
"test:ci:run": "lerna exec 'yarn run test:ci'",
"format": "./scripts/format",
"lint-staged": "./scripts/run-staged-pkg --lint",
"format-staged": "./scripts/format --staged",
"lint-license": "./scripts/license-to-fail",
"lint-docs": "./scripts/quality-docs",
"format": "prettier --config .prettierrc --write '**/*'",
"clean": "lerna clean --yes",
"commitmsg": "commitlint -e",
"precommit": "CI=1 redrun -s lint-staged format-staged",
"precommit": "pretty-quick --staged",
"commit": "commit"
},
"devDependencies": {
"@commitlint/cli": "^4.2.1",
"@commitlint/config-angular": "^4.2.1",
"@commitlint/prompt-cli": "^4.2.1",
"apr-awaitify": "^3.0.3",
"apr-filter": "^3.0.3",
"apr-for-each": "^3.0.3",
"apr-main": "^4.0.3",
"apr-map": "^3.0.3",
"apr-parallel": "^3.0.3",
"apr-reduce": "^3.0.3",
"babel-eslint": "^8.2.2",
"checksum": "^0.1.1",
"eslint": "^4.18.1",
"eslint-config-prettier": "^2.9.0",
"eslint-config-react-app": "^2.1.0",
Expand All @@ -49,17 +37,11 @@
"eslint-plugin-markdown": "^1.0.0-beta.6",
"eslint-plugin-prettier": "^2.6.0",
"eslint-plugin-react": "^7.7.0",
"execa": "^0.9.0",
"force-array": "^3.1.0",
"husky": "^0.14.3",
"lerna": "^2.9.0",
"license-to-fail": "^2.2.0",
"lodash.uniq": "^4.5.0",
"prettier": "1.11.0",
"quality-docs": "^3.3.0",
"redrun": "^5.10.5",
"staged-git-files": "0.0.4",
"yargs": "^10.0.3"
"pretty-quick": "^1.4.1",
"redrun": "^5.10.5"
},
"resolutions": {
"axios": "0.16.2",
Expand All @@ -74,8 +56,5 @@
"breeze-nexttick": "0.2.1",
"isarray": "1.0.0"
},
"workspaces": [
"packages/*",
"bundle"
]
"workspaces": ["packages/*", "bundle"]
}
5 changes: 1 addition & 4 deletions packages/icons/.tern-project
@@ -1,8 +1,5 @@
{
"libs": [
"ecmascript",
"browser"
],
"libs": ["ecmascript", "browser"],
"plugins": {
"doc_comment": true,
"local-scope": true,
Expand Down
5 changes: 1 addition & 4 deletions packages/logos/.tern-project
@@ -1,8 +1,5 @@
{
"libs": [
"ecmascript",
"browser"
],
"libs": ["ecmascript", "browser"],
"plugins": {
"doc_comment": true,
"local-scope": true,
Expand Down
13 changes: 9 additions & 4 deletions packages/my-joy-images/.babelrc
@@ -1,7 +1,12 @@
{
"ignore": ["_document.js"],
"presets": [["joyent-portal", {
"aliases": true,
"autoAliases": true
}]]
"presets": [
[
"joyent-portal",
{
"aliases": true,
"autoAliases": true
}
]
]
}
8 changes: 3 additions & 5 deletions packages/my-joy-images/.tern-project
@@ -1,15 +1,13 @@
{
"libs": [
"ecmascript",
"browser"
],
"libs": ["ecmascript", "browser"],
"plugins": {
"doc_comment": true,
"local-scope": true,
"jsx": true,
"node": true,
"webpack": {
"configPath": "../../node_modules/joyent-react-scripts/src/webpack.config.dev.js"
"configPath":
"../../node_modules/joyent-react-scripts/src/webpack.config.dev.js"
}
}
}
5 changes: 4 additions & 1 deletion packages/my-joy-images/src/state/apollo-client.js
Expand Up @@ -28,7 +28,10 @@ export default (opts = {}) => {
credentials: 'same-origin',
fetch,
headers: {
'X-CSRF-Token': global.cookie.replace(/(?:(?:^|.*;\s*)crumb\s*=\s*([^;]*).*$)|^.*$/, '$1')
'X-CSRF-Token': global.cookie.replace(
/(?:(?:^|.*;\s*)crumb\s*=\s*([^;]*).*$)|^.*$/,
'$1'
)
}
}),
...opts
Expand Down
13 changes: 9 additions & 4 deletions packages/my-joy-instances/.babelrc
@@ -1,7 +1,12 @@
{
"ignore": ["_document.js", "_aliases.js"],
"presets": [["joyent-portal", {
"aliases": true,
"autoAliases": true
}]]
"presets": [
[
"joyent-portal",
{
"aliases": true,
"autoAliases": true
}
]
]
}
2 changes: 1 addition & 1 deletion packages/my-joy-instances/.lighthouserc
Expand Up @@ -5,4 +5,4 @@
"href": "http://0.0.0.0:3069"
},
"extends": "lighthouse:default"
}
}
8 changes: 3 additions & 5 deletions packages/my-joy-instances/.tern-project
@@ -1,15 +1,13 @@
{
"libs": [
"ecmascript",
"browser"
],
"libs": ["ecmascript", "browser"],
"plugins": {
"doc_comment": true,
"local-scope": true,
"jsx": true,
"node": true,
"webpack": {
"configPath": "../../node_modules/joyent-react-scripts/src/webpack.config.dev.js"
"configPath":
"../../node_modules/joyent-react-scripts/src/webpack.config.dev.js"
}
}
}
2 changes: 1 addition & 1 deletion packages/ui-toolkit/.stylelintrc
@@ -1,4 +1,4 @@
{
"test": ["./src/**/*.js"],
"extends": ["stylelint-config-joyent-portal"]
}
}
7 changes: 2 additions & 5 deletions packages/ui-toolkit/.tern-project
@@ -1,8 +1,5 @@
{
"libs": [
"ecmascript",
"browser"
],
"libs": ["ecmascript", "browser"],
"plugins": {
"doc_comment": true,
"local-scope": true,
Expand All @@ -12,4 +9,4 @@
"configPath": "./webpack/index.js"
}
}
}
}

0 comments on commit 23ddc68

Please sign in to comment.