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

Update JavaScript / ESLint guidance #310

Merged
merged 1 commit into from
Apr 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"sourceType": "module"
},
"extends": [
"google",
"prettier"
],
"rules": {
Expand Down
9 changes: 5 additions & 4 deletions content/code-style/code-style-javascript.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,17 @@ The one exception is that preexisting libraries included in your applications sh
Some IDE’s provide linting support built into their package system. For command-line you’ll need to install the package with administrative/root privilege

```sh
npm install eslint eslint-config-google --save-dev
npm install eslint --save-dev
# or
yarn add eslint eslint-config-google --dev
yarn add eslint --dev
```

Once the eslint-config-google package is installed, you can use it by specifying google in the extends section of your [ESLint configuration](http://eslint.org/docs/user-guide/configuring).
Once eslint is installed, you can use it by specifying `eslint:recommended` in the extends section of your [ESLint configuration](http://eslint.org/docs/user-guide/configuring).

```json
{
"extends": "google",
"root": true,
"extends": ["eslint:recommended"],
"rules": {
// Additional, per-project rules...
}
Expand Down
Loading
Loading