Skip to content

Commit 9d8885a

Browse files
Remove guard-for-in (#1)
1 parent f9fe3f2 commit 9d8885a

File tree

6 files changed

+86
-3
lines changed

6 files changed

+86
-3
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## 0.3.1
4+
5+
### students
6+
7+
- Remove `guard-for-in`
8+
39
## 0.3.0
410

511
### maintainers

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2019 Exercism
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# @exercism/eslint-config-javascript
2+
3+
This is the shared [`eslint`][web-eslint] configuration used by the [JavaScript track][git-javascript] (for students) and the files contributors and maintainers touch. [Shareable configs][web-shareable-configs] are designed to work with the `extends` feature of `.eslintrc` files. This means you can use the same configuration you're used to on [Exercism][web-exercism] in your on projects!
4+
5+
## Usage
6+
7+
To use the configuration for students, open your [eslint configuration][web-eslint-configuration] file, and add the following value to `extends`. For example, for JSON based configuration files:
8+
9+
```json
10+
{
11+
"extends": "@exercism/eslint-config-javascript"
12+
}
13+
```
14+
15+
To use the configuration used by contributors and maintainers, add the following to `extends`:
16+
17+
```json
18+
{
19+
"extends": "@exercism/eslint-config-javascript/maintainers"
20+
}
21+
```
22+
23+
## Students configuration
24+
25+
Find the student configuration [here](index.js). It's goal is to help detect and prevent common problems, without making _any_ decisions about code-style.
26+
27+
The rules are based on:
28+
29+
- [`eslint:recommended`][web-eslint-recommended]
30+
- [`plugin:import`][git-eslint-plugin-import]
31+
- A few extra rules that catch common issues but are not enabled via the recommended plugin. See [this PR][git-javascript-pr-1094] for a bit of discussion and rationale.
32+
33+
Because the [Exercism JavaScript track][git-javascript] is primarily focussing on running the exercises on Node, only `node` and `es2021` are turned on as environment, but when extending this configuration, you can add more (or turn those off).
34+
35+
## Maintainers configuration
36+
37+
Similar to the students configuration, and found [here](maintainers.js), it also includes the [`prettier` plugin][git-eslint-plugin-prettier] because we use [`prettier`][web-prettier] to achieve consistent code formatting. This plugin turns _off_ rules that conflict with formatting.
38+
39+
Additionally, it doesn't have warnings but errors for most/all of the rules in the students configuration.
40+
41+
## Tooling configuration
42+
43+
Because the tooling (such as the [JavaScript Analyzer][git-javascript-analyzer], [Representer][git-javascript-representer], and [Test Runner][git-javascript-test-runner]) are written in TypeScript, they don't use the same configuration files. If you're looking for those, or to build your own tools in TypeScript, go to [@exercism/eslint-config-tooling][git-eslint-config-tooling].
44+
45+
[git-eslint-config-tooling]: https://github.com/exercism/eslint-config-tooling
46+
[git-eslint-plugin-import]: https://github.com/benmosher/eslint-plugin-import
47+
[git-eslint-plugin-prettier]: https://github.com/prettier/eslint-config-prettier
48+
[git-javascript]: https://github.com/exercism/javascript
49+
[git-javascript-analyzer]: https://github.com/exercism/javascript-analyzer
50+
[git-javascript-pr-1094]: https://github.com/exercism/javascript/pull/1094
51+
[git-javascript-representer]: https://github.com/exercism/javascript-representer
52+
[git-javascript-test-runner]: https://github.com/exercism/javascript-test-runner
53+
[web-eslint]: https://eslint.org
54+
[web-eslint-configuration]: https://eslint.org/docs/user-guide/configuring/
55+
[web-eslint-recommended]: https://eslint.org/docs/rules/
56+
[web-exercism]: https://exercism.io
57+
[web-prettier]: https://prettier.io
58+
[web-shareable-configs]: https://eslint.org/docs/developer-guide/shareable-configs

index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ module.exports = {
2222
'array-callback-return': ['warn', { checkForEach: false }],
2323
'default-param-last': 'error',
2424
eqeqeq: ['warn', 'smart'],
25-
'guard-for-in': 'warn',
2625
'linebreak-style': 'off',
2726
'no-eval': ['error', { allowIndirect: true }],
2827
'no-extend-native': 'warn',

maintainers.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ module.exports = {
2323
'array-callback-return': ['error', { checkForEach: true }],
2424
'default-param-last': 'error',
2525
eqeqeq: ['error', 'smart'],
26-
'guard-for-in': 'error',
2726
'linebreak-style': 'off',
2827
'no-eval': ['error', { allowIndirect: true }],
2928
'no-extend-native': 'error',

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@exercism/eslint-config-javascript",
3-
"version": "0.3.0",
3+
"version": "0.3.1",
44
"description": "ESLint configuration for the JavaScript track on Exercism",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)