Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce EditorConfig #13442

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
25 changes: 25 additions & 0 deletions .editorconfig
@@ -0,0 +1,25 @@
# http://editorconfig.org

root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 2
#max_line_length = 80
trim_trailing_whitespace = true
eclint_block_comment_start = /*
eclint_block_comment = *
eclint_block_comment_end = */

[*.md]
indent_size = unset
trim_trailing_whitespace = false

[*.snap]
indent_size = unset

[*.svg]
insert_final_newline = false
2 changes: 1 addition & 1 deletion docusaurus/website/.gitignore
Expand Up @@ -17,4 +17,4 @@

npm-debug.log*
yarn-debug.log*
yarn-error.log*
yarn-error.log*
1 change: 0 additions & 1 deletion netlify.toml
Expand Up @@ -2,4 +2,3 @@
base = "docusaurus/website"
publish = "docusaurus/website/build"
command = "npm run build"

2 changes: 1 addition & 1 deletion packages/confusing-browser-globals/README.md
Expand Up @@ -11,7 +11,7 @@ For example:
```js
handleClick() { // missing `event` argument
this.setState({
text: event.target.value // uses the `event` global: oops!
text: event.target.value // uses the `event` global: oops!
});
}
```
Expand Down
8 changes: 4 additions & 4 deletions packages/react-error-overlay/src/__tests__/parser/react.js
Expand Up @@ -11,10 +11,10 @@ test('15.y.z', () => {
expect(
parse(
`Warning: Each child in array should have a unique "key" prop. Check render method of \`FileA\`.
in div (at FileA.js:9)
in FileA (at App.js:9)
in div (at App.js:8)
in App (at index.js:7)`
in div (at FileA.js:9)
in FileA (at App.js:9)
in div (at App.js:8)
in App (at index.js:7)`
)
).toMatchSnapshot();
});
12 changes: 6 additions & 6 deletions packages/react-scripts/fixtures/kitchensink/template/.env
@@ -1,7 +1,7 @@
REACT_APP_X = x-from-original-env
REACT_APP_ORIGINAL_1 = from-original-env-1
REACT_APP_ORIGINAL_2 = from-original-env-2
REACT_APP_BASIC = basic
REACT_APP_BASIC_EXPAND = ${REACT_APP_BASIC}
REACT_APP_BASIC_EXPAND_SIMPLE = $REACT_APP_BASIC
REACT_APP_X = x-from-original-env
REACT_APP_ORIGINAL_1 = from-original-env-1
REACT_APP_ORIGINAL_2 = from-original-env-2
REACT_APP_BASIC = basic
REACT_APP_BASIC_EXPAND = ${REACT_APP_BASIC}
REACT_APP_BASIC_EXPAND_SIMPLE = $REACT_APP_BASIC
REACT_APP_EXPAND_EXISTING = $REACT_APP_SHELL_ENV_MESSAGE
2 changes: 1 addition & 1 deletion tasks/e2e-behavior.sh
Expand Up @@ -20,7 +20,7 @@ temp_app_path=`mktemp -d 2>/dev/null || mktemp -d -t 'temp_app_path'`
source local-registry.sh

function cleanup {
echo 'Cleaning up.'
echo 'Cleaning up.'
ps -ef | grep 'react-scripts' | grep -v grep | awk '{print $2}' | xargs kill -9
cd "$root_path"
# Restore the original NPM and Yarn registry URLs and stop Verdaccio
Expand Down
12 changes: 6 additions & 6 deletions tasks/e2e-installs.sh
Expand Up @@ -52,21 +52,21 @@ function exists {
function checkDependencies {
if ! awk '/"dependencies": {/{y=1;next}/},/{y=0; next}y' package.json | \
grep -v -q -E '^\s*"(@testing-library\/.+)|web-vitals|(react(-dom|-scripts)?)"'; then
echo "Dependencies are correct"
echo "Dependencies are correct"
else
echo "There are extraneous dependencies in package.json"
exit 1
echo "There are extraneous dependencies in package.json"
exit 1
fi
}

# Check for accidental dependencies in package.json
function checkTypeScriptDependencies {
if ! awk '/"dependencies": {/{y=1;next}/},/{y=0; next}y' package.json | \
grep -v -q -E '^\s*"(@testing-library\/.+)|web-vitals|(@types\/.+)|typescript|(react(-dom|-scripts)?)"'; then
echo "Dependencies are correct"
echo "Dependencies are correct"
else
echo "There are extraneous dependencies in package.json"
exit 1
echo "There are extraneous dependencies in package.json"
exit 1
fi
}

Expand Down
12 changes: 6 additions & 6 deletions tasks/screencast.sh
Expand Up @@ -24,10 +24,10 @@ sleep 1
echo "npm start" | pv -qL $[10+(-2 + RANDOM%5)]

BROWSER="none" node "$(dirname $0)/screencast-start.js" \
--command "npm start" \
--pattern="Compiled successfully*" \
--pattern-count 2 \
--error-pattern="*already running on port" \
--timeout 10
--command "npm start" \
--pattern="Compiled successfully*" \
--pattern-count 2 \
--error-pattern="*already running on port" \
--timeout 10

echo ""
echo ""
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.