Enforce Prettier defaults + also format .babelrc and .json (#7499)
* .prettierrc: full configuration for Prettier This way, contributors using different-from-default settings will still use the correct prettier settings * Makefile: also lint .babelrc.js * Makefile: also prettify .json files * Exclude package.json files and correct build dir * Add more default options to prettierrc and load it in cli This avoids prettier looking up the config for each file * Format json * Update prettier and eslint and reformat codebase * Remove obsolete file * Add comment
This commit is contained in:
6
Makefile
6
Makefile
@@ -53,10 +53,12 @@ flow:
|
||||
./node_modules/.bin/flow check --strip-root
|
||||
|
||||
lint:
|
||||
./node_modules/.bin/eslint scripts $(SOURCES) *.js --format=codeframe --rulesdir="./scripts/eslint_rules"
|
||||
./node_modules/.bin/eslint scripts $(SOURCES) '*.js' '**/.*.js' --format=codeframe --rulesdir="./scripts/eslint_rules"
|
||||
|
||||
fix:
|
||||
./node_modules/.bin/eslint scripts $(SOURCES) *.js --format=codeframe --fix --rulesdir="./scripts/eslint_rules"
|
||||
# The config is hardcoded because otherwise prettier searches for it and also picks up some broken package.json files from tests
|
||||
./node_modules/.bin/prettier --config .prettierrc --write --ignore-path .eslintignore '**/*.json'
|
||||
./node_modules/.bin/eslint scripts $(SOURCES) '*.js' '**/.*.js' --format=codeframe --fix --rulesdir="./scripts/eslint_rules"
|
||||
|
||||
clean: test-clean
|
||||
rm -rf packages/babel-polyfill/browser*
|
||||
|
||||
Reference in New Issue
Block a user