Skip to content

Commit

Permalink
Switch formatting tools to 2-space indent for all files
Browse files Browse the repository at this point in the history
  • Loading branch information
thibaudcolas committed Sep 29, 2018
1 parent 155c834 commit 9c666b9
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 19 deletions.
12 changes: 7 additions & 5 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,10 @@ end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 4

# Rules for tool configuration.
[{package.json,*.yml,*.yaml}]
indent_size = 2
max_line_length = 80

# Rules for markdown documents.
# Documentation.
[*.md]
max_line_length = 0
trim_trailing_whitespace = false
Expand All @@ -26,3 +23,8 @@ trim_trailing_whitespace = false
[COMMIT_EDITMSG]
max_line_length = 0
trim_trailing_whitespace = false

# Makefiles require tabs.
[Makefile]
indent_style = tab
indent_size = 8
2 changes: 0 additions & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,4 @@ node_modules
coverage/
dist/
*.bundle.js
*.json
*.css
*.html
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@
"linter:css": "stylelint",
"linter": "prettier --list-different",
"formatter": "prettier --write",
"lint": "npm run linter:js -s -- . && npm run linter:css -s -- '**/*.scss' && npm run linter -s -- '**/*.{js,scss,css,md,yml,yaml}'",
"format": "npm run formatter -s -- '**/*.{js,scss,css,md,yml,yaml}'",
"lint": "npm run linter:js -s -- . && npm run linter:css -s -- '**/*.scss' && npm run linter -s -- '**/*.{js,scss,css,json,md,yml,yaml}'",
"format": "npm run formatter -s -- '**/*.{js,scss,css,json,md,yml,yaml}'",
"test": "jest",
"test:integration": "jest --config tests/integration/jest.config.js",
"test:integration:watch": "jest --config tests/integration/jest.config.js --watch",
Expand Down
19 changes: 9 additions & 10 deletions prettier.config.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
// See https://prettier.io/docs/en/options.html.
module.exports = {
printWidth: 80,
tabWidth: 4,
useTabs: false,
semi: true,
singleQuote: true,
trailingComma: 'all',
bracketSpacing: true,
jsxBracketSameLine: false,
arrowParens: 'always',
proseWrap: 'preserve',
printWidth: 80,
tabWidth: 2,
useTabs: false,
semi: true,
singleQuote: false,
trailingComma: "all",
bracketSpacing: true,
arrowParens: "always",
proseWrap: "preserve",
};

0 comments on commit 9c666b9

Please sign in to comment.