eslint-config-conventions 3.0.0 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.json +6 -4
- package/README.md +4 -4
- package/package.json +17 -13
- package/.commitlintrc.json +0 -1
- package/.editorconfig +0 -11
- package/.eslintignore +0 -2
- package/.gitattributes +0 -1
- package/.github/ISSUE_TEMPLATE/BUG.md +0 -20
- package/.github/ISSUE_TEMPLATE/DOCUMENTATION.md +0 -18
- package/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md +0 -20
- package/.github/ISSUE_TEMPLATE/IMPROVEMENT.md +0 -20
- package/.github/ISSUE_TEMPLATE/QUESTION.md +0 -8
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -7
- package/.github/workflows/lint.yml +0 -28
- package/.github/workflows/release.yml +0 -29
- package/.github/workflows/test.yml +0 -25
- package/.husky/commit-msg +0 -4
- package/.husky/pre-commit +0 -5
- package/.lintstagedrc.json +0 -6
- package/.markdownlint.json +0 -6
- package/.prettierrc.json +0 -6
- package/.releaserc.json +0 -19
- package/.taprc +0 -8
- package/.vscode/extensions.json +0 -8
- package/.vscode/settings.json +0 -10
- package/CODE_OF_CONDUCT.md +0 -132
- package/CONTRIBUTING.md +0 -46
- package/eslintrc.json +0 -6
- package/test/basic.js +0 -14
- package/test/fixtures/javascript-no-errors.js +0 -5
- package/test/fixtures/javascript-with-errors.js +0 -1
- package/test/fixtures/top-level-await.mjs +0 -3
- package/test/fixtures/typescript-no-errors.ts +0 -5
- package/test/fixtures/typescript-with-errors.ts +0 -5
- package/test/validate-config.js +0 -37
- package/tsconfig.json +0 -12
package/.eslintrc.json
CHANGED
|
@@ -145,6 +145,11 @@
|
|
|
145
145
|
"quote-props": ["error", "as-needed"],
|
|
146
146
|
"radix": "error",
|
|
147
147
|
"yoda": ["error", "never"],
|
|
148
|
+
"curly": ["error", "all"],
|
|
149
|
+
"func-style": ["error", "expression"],
|
|
150
|
+
"prefer-arrow-callback": "error",
|
|
151
|
+
"arrow-parens": ["error", "always"],
|
|
152
|
+
"arrow-body-style": ["error", "always"],
|
|
148
153
|
|
|
149
154
|
"import/no-absolute-path": "error",
|
|
150
155
|
"import/no-webpack-loader-syntax": "error",
|
|
@@ -247,6 +252,7 @@
|
|
|
247
252
|
"error",
|
|
248
253
|
"interface"
|
|
249
254
|
],
|
|
255
|
+
"@typescript-eslint/consistent-type-imports": "error",
|
|
250
256
|
"@typescript-eslint/explicit-function-return-type": [
|
|
251
257
|
"error",
|
|
252
258
|
{
|
|
@@ -275,10 +281,6 @@
|
|
|
275
281
|
],
|
|
276
282
|
"@typescript-eslint/no-base-to-string": "error",
|
|
277
283
|
"@typescript-eslint/no-dynamic-delete": "error",
|
|
278
|
-
"@typescript-eslint/no-empty-interface": [
|
|
279
|
-
"error",
|
|
280
|
-
{ "allowSingleExtends": true }
|
|
281
|
-
],
|
|
282
284
|
"@typescript-eslint/no-extra-non-null-assertion": "error",
|
|
283
285
|
"@typescript-eslint/no-extraneous-class": [
|
|
284
286
|
"error",
|
package/README.md
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
|
|
24
24
|
**eslint-config-conventions** is a [ESLint](https://eslint.org) configuration to enforce strict conventions and good code quality, it is highly inspired from [eslint-config-standard-with-typescript](https://github.com/standard/eslint-config-standard-with-typescript) but it is **stricter** and with **no formatting rules**, **only code-quality rules**. It supports both **JavaScript** and **TypeScript**.
|
|
25
25
|
|
|
26
|
-
This configuration is mostly **for catching bugs** and **code-quality** so it is
|
|
26
|
+
This configuration is mostly **for catching bugs** and **code-quality** so it is recommended to use it with [Prettier](https://prettier.io/) for a consistent code style, it works with any `.prettierrc.json` configuration.
|
|
27
27
|
|
|
28
28
|
More information about **formatting rules** vs **code-quality rules** can be found on [Prettier vs. Linters](https://prettier.io/docs/en/comparison.html).
|
|
29
29
|
|
|
@@ -62,9 +62,9 @@ If you want to use **TypeScript**, you also need to install:
|
|
|
62
62
|
|
|
63
63
|
```sh
|
|
64
64
|
npm install --save-dev \
|
|
65
|
-
typescript@^4.
|
|
66
|
-
@typescript-eslint/eslint-plugin@^5.
|
|
67
|
-
@typescript-eslint/parser@^5.
|
|
65
|
+
typescript@^4.8.2 \
|
|
66
|
+
@typescript-eslint/eslint-plugin@^5.36.1 \
|
|
67
|
+
@typescript-eslint/parser@^5.36.1
|
|
68
68
|
```
|
|
69
69
|
|
|
70
70
|
Dependencies are:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-config-conventions",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.1",
|
|
4
4
|
"public": true,
|
|
5
5
|
"description": "ESLint shareable config to enforce strict conventions and good code quality.",
|
|
6
6
|
"author": "Divlo <contact@divlo.fr>",
|
|
@@ -23,6 +23,10 @@
|
|
|
23
23
|
"conventions"
|
|
24
24
|
],
|
|
25
25
|
"main": "index.js",
|
|
26
|
+
"files": [
|
|
27
|
+
"index.js",
|
|
28
|
+
".eslintrc.json"
|
|
29
|
+
],
|
|
26
30
|
"engines": {
|
|
27
31
|
"node": ">=16.0.0",
|
|
28
32
|
"npm": ">=8.0.0"
|
|
@@ -30,7 +34,7 @@
|
|
|
30
34
|
"scripts": {
|
|
31
35
|
"lint:commit": "commitlint",
|
|
32
36
|
"lint:editorconfig": "editorconfig-checker",
|
|
33
|
-
"lint:markdown": "markdownlint
|
|
37
|
+
"lint:markdown": "markdownlint-cli2",
|
|
34
38
|
"lint:javascript": "eslint \"**/*.{js,jsx,ts,tsx}\" -c \"eslintrc.json\"",
|
|
35
39
|
"lint:prettier": "prettier \".\" --check --ignore-path \".gitignore\"",
|
|
36
40
|
"lint:staged": "lint-staged",
|
|
@@ -47,24 +51,24 @@
|
|
|
47
51
|
"eslint-plugin-unicorn": "^43.0.0"
|
|
48
52
|
},
|
|
49
53
|
"devDependencies": {
|
|
50
|
-
"@commitlint/cli": "17.
|
|
51
|
-
"@commitlint/config-conventional": "17.0
|
|
52
|
-
"@types/eslint": "8.4.
|
|
54
|
+
"@commitlint/cli": "17.1.2",
|
|
55
|
+
"@commitlint/config-conventional": "17.1.0",
|
|
56
|
+
"@types/eslint": "8.4.6",
|
|
53
57
|
"@types/tap": "15.0.7",
|
|
54
|
-
"@typescript-eslint/eslint-plugin": "5.
|
|
55
|
-
"@typescript-eslint/parser": "5.
|
|
58
|
+
"@typescript-eslint/eslint-plugin": "5.36.1",
|
|
59
|
+
"@typescript-eslint/parser": "5.36.1",
|
|
56
60
|
"editorconfig-checker": "4.0.2",
|
|
57
|
-
"eslint": "8.
|
|
61
|
+
"eslint": "8.23.0",
|
|
58
62
|
"eslint-plugin-import": "2.26.0",
|
|
59
|
-
"eslint-plugin-promise": "6.0.
|
|
60
|
-
"eslint-plugin-unicorn": "43.0.
|
|
63
|
+
"eslint-plugin-promise": "6.0.1",
|
|
64
|
+
"eslint-plugin-unicorn": "43.0.2",
|
|
61
65
|
"husky": "8.0.1",
|
|
62
66
|
"lint-staged": "13.0.3",
|
|
63
|
-
"markdownlint-
|
|
67
|
+
"markdownlint-cli2": "0.5.1",
|
|
64
68
|
"pinst": "3.0.0",
|
|
65
69
|
"prettier": "2.7.1",
|
|
66
|
-
"semantic-release": "19.0.
|
|
70
|
+
"semantic-release": "19.0.5",
|
|
67
71
|
"tap": "16.3.0",
|
|
68
|
-
"typescript": "4.
|
|
72
|
+
"typescript": "4.8.2"
|
|
69
73
|
}
|
|
70
74
|
}
|
package/.commitlintrc.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{ "extends": ["@commitlint/config-conventional"] }
|
package/.editorconfig
DELETED
package/.eslintignore
DELETED
package/.gitattributes
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
* text=auto eol=lf
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: '🐛 Bug Report'
|
|
3
|
-
about: 'Report an unexpected problem or unintended behavior.'
|
|
4
|
-
title: '[Bug]'
|
|
5
|
-
labels: 'bug'
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
<!--
|
|
9
|
-
Please provide a clear and concise description of what the bug is. Include
|
|
10
|
-
screenshots if needed. Please make sure your issue has not already been fixed.
|
|
11
|
-
-->
|
|
12
|
-
|
|
13
|
-
## Steps To Reproduce
|
|
14
|
-
|
|
15
|
-
1. Step 1
|
|
16
|
-
2. Step 2
|
|
17
|
-
|
|
18
|
-
## The current behavior
|
|
19
|
-
|
|
20
|
-
## The expected behavior
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: '📜 Documentation'
|
|
3
|
-
about: 'Correct spelling errors, improvements or additions to documentation files (README, CONTRIBUTING...).'
|
|
4
|
-
title: '[Documentation]'
|
|
5
|
-
labels: 'documentation'
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
<!-- Please make sure your issue has not already been fixed. -->
|
|
9
|
-
|
|
10
|
-
## Documentation
|
|
11
|
-
|
|
12
|
-
<!-- Please uncomment the type of documentation problem this issue address -->
|
|
13
|
-
|
|
14
|
-
<!-- Documentation is Missing -->
|
|
15
|
-
<!-- Documentation is Confusing -->
|
|
16
|
-
<!-- Documentation has Typo errors -->
|
|
17
|
-
|
|
18
|
-
## Proposal
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: '✨ Feature Request'
|
|
3
|
-
about: 'Suggest a new feature idea.'
|
|
4
|
-
title: '[Feature]'
|
|
5
|
-
labels: 'feature request'
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
<!-- Please make sure your issue has not already been fixed. -->
|
|
9
|
-
|
|
10
|
-
## Description
|
|
11
|
-
|
|
12
|
-
<!-- A clear and concise description of the problem or missing capability... -->
|
|
13
|
-
|
|
14
|
-
## Describe the solution you'd like
|
|
15
|
-
|
|
16
|
-
<!-- If you have a solution in mind, please describe it. -->
|
|
17
|
-
|
|
18
|
-
## Describe alternatives you've considered
|
|
19
|
-
|
|
20
|
-
<!-- Have you considered any alternative solutions or workarounds? -->
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: '🔧 Improvement'
|
|
3
|
-
about: 'Improve structure/format/performance/refactor/tests of the code.'
|
|
4
|
-
title: '[Improvement]'
|
|
5
|
-
labels: 'improvement'
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
<!-- Please make sure your issue has not already been fixed. -->
|
|
9
|
-
|
|
10
|
-
## Type of Improvement
|
|
11
|
-
|
|
12
|
-
<!-- Please uncomment the type of improvements this issue address -->
|
|
13
|
-
|
|
14
|
-
<!-- Files and Folders Structure -->
|
|
15
|
-
<!-- Performance -->
|
|
16
|
-
<!-- Refactoring code -->
|
|
17
|
-
<!-- Tests -->
|
|
18
|
-
<!-- Not Sure? -->
|
|
19
|
-
|
|
20
|
-
## Proposal
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
name: 'Lint'
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches: [develop]
|
|
6
|
-
pull_request:
|
|
7
|
-
branches: [master, develop]
|
|
8
|
-
|
|
9
|
-
jobs:
|
|
10
|
-
lint:
|
|
11
|
-
runs-on: 'ubuntu-latest'
|
|
12
|
-
steps:
|
|
13
|
-
- uses: 'actions/checkout@v3.0.0'
|
|
14
|
-
|
|
15
|
-
- name: 'Use Node.js'
|
|
16
|
-
uses: 'actions/setup-node@v3.1.0'
|
|
17
|
-
with:
|
|
18
|
-
node-version: 'lts/*'
|
|
19
|
-
cache: 'npm'
|
|
20
|
-
|
|
21
|
-
- name: 'Install'
|
|
22
|
-
run: 'npm install'
|
|
23
|
-
|
|
24
|
-
- run: 'npm run lint:commit -- --to "${{ github.sha }}"'
|
|
25
|
-
- run: 'npm run lint:editorconfig'
|
|
26
|
-
- run: 'npm run lint:markdown'
|
|
27
|
-
- run: 'npm run lint:javascript'
|
|
28
|
-
- run: 'npm run lint:prettier'
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
name: 'Release'
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches: [master]
|
|
6
|
-
|
|
7
|
-
jobs:
|
|
8
|
-
release:
|
|
9
|
-
runs-on: 'ubuntu-latest'
|
|
10
|
-
steps:
|
|
11
|
-
- uses: 'actions/checkout@v3.0.0'
|
|
12
|
-
with:
|
|
13
|
-
fetch-depth: 0
|
|
14
|
-
persist-credentials: false
|
|
15
|
-
|
|
16
|
-
- name: 'Use Node.js'
|
|
17
|
-
uses: 'actions/setup-node@v3.1.0'
|
|
18
|
-
with:
|
|
19
|
-
node-version: 'lts/*'
|
|
20
|
-
cache: 'npm'
|
|
21
|
-
|
|
22
|
-
- name: 'Install'
|
|
23
|
-
run: 'npm install'
|
|
24
|
-
|
|
25
|
-
- name: 'Release'
|
|
26
|
-
run: 'npm run release'
|
|
27
|
-
env:
|
|
28
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
29
|
-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
name: 'Test'
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches: [develop]
|
|
6
|
-
pull_request:
|
|
7
|
-
branches: [master, develop]
|
|
8
|
-
|
|
9
|
-
jobs:
|
|
10
|
-
test:
|
|
11
|
-
runs-on: 'ubuntu-latest'
|
|
12
|
-
steps:
|
|
13
|
-
- uses: 'actions/checkout@v3.0.0'
|
|
14
|
-
|
|
15
|
-
- name: 'Use Node.js'
|
|
16
|
-
uses: 'actions/setup-node@v3.1.0'
|
|
17
|
-
with:
|
|
18
|
-
node-version: 'lts/*'
|
|
19
|
-
cache: 'npm'
|
|
20
|
-
|
|
21
|
-
- name: 'Install'
|
|
22
|
-
run: 'npm install'
|
|
23
|
-
|
|
24
|
-
- name: 'Test'
|
|
25
|
-
run: 'npm run test'
|
package/.husky/commit-msg
DELETED
package/.husky/pre-commit
DELETED
package/.lintstagedrc.json
DELETED
package/.markdownlint.json
DELETED
package/.prettierrc.json
DELETED
package/.releaserc.json
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"branches": ["master"],
|
|
3
|
-
"plugins": [
|
|
4
|
-
[
|
|
5
|
-
"@semantic-release/commit-analyzer",
|
|
6
|
-
{
|
|
7
|
-
"preset": "conventionalcommits"
|
|
8
|
-
}
|
|
9
|
-
],
|
|
10
|
-
[
|
|
11
|
-
"@semantic-release/release-notes-generator",
|
|
12
|
-
{
|
|
13
|
-
"preset": "conventionalcommits"
|
|
14
|
-
}
|
|
15
|
-
],
|
|
16
|
-
"@semantic-release/npm",
|
|
17
|
-
"@semantic-release/github"
|
|
18
|
-
]
|
|
19
|
-
}
|
package/.taprc
DELETED
package/.vscode/extensions.json
DELETED
package/.vscode/settings.json
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"typescript.tsdk": "node_modules/typescript/lib",
|
|
3
|
-
"typescript.preferences.importModuleSpecifierEnding": "js",
|
|
4
|
-
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
5
|
-
"prettier.configPath": ".prettierrc.json",
|
|
6
|
-
"editor.formatOnSave": true,
|
|
7
|
-
"editor.codeActionsOnSave": {
|
|
8
|
-
"source.fixAll": true
|
|
9
|
-
}
|
|
10
|
-
}
|
package/CODE_OF_CONDUCT.md
DELETED
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
# Contributor Covenant Code of Conduct
|
|
2
|
-
|
|
3
|
-
## Our Pledge
|
|
4
|
-
|
|
5
|
-
We as members, contributors, and leaders pledge to make participation in our
|
|
6
|
-
community a harassment-free experience for everyone, regardless of age, body
|
|
7
|
-
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
|
8
|
-
identity and expression, level of experience, education, socio-economic status,
|
|
9
|
-
nationality, personal appearance, race, religion, or sexual identity
|
|
10
|
-
and orientation.
|
|
11
|
-
|
|
12
|
-
We pledge to act and interact in ways that contribute to an open, welcoming,
|
|
13
|
-
diverse, inclusive, and healthy community.
|
|
14
|
-
|
|
15
|
-
## Our Standards
|
|
16
|
-
|
|
17
|
-
Examples of behavior that contributes to a positive environment for our
|
|
18
|
-
community include:
|
|
19
|
-
|
|
20
|
-
- Demonstrating empathy and kindness toward other people
|
|
21
|
-
- Being respectful of differing opinions, viewpoints, and experiences
|
|
22
|
-
- Giving and gracefully accepting constructive feedback
|
|
23
|
-
- Accepting responsibility and apologizing to those affected by our mistakes,
|
|
24
|
-
and learning from the experience
|
|
25
|
-
- Focusing on what is best not just for us as individuals, but for the
|
|
26
|
-
overall community
|
|
27
|
-
|
|
28
|
-
Examples of unacceptable behavior include:
|
|
29
|
-
|
|
30
|
-
- The use of sexualized language or imagery, and sexual attention or
|
|
31
|
-
advances of any kind
|
|
32
|
-
- Trolling, insulting or derogatory comments, and personal or political attacks
|
|
33
|
-
- Public or private harassment
|
|
34
|
-
- Publishing others' private information, such as a physical or email
|
|
35
|
-
address, without their explicit permission
|
|
36
|
-
- Other conduct which could reasonably be considered inappropriate in a
|
|
37
|
-
professional setting
|
|
38
|
-
|
|
39
|
-
## Enforcement Responsibilities
|
|
40
|
-
|
|
41
|
-
Community leaders are responsible for clarifying and enforcing our standards of
|
|
42
|
-
acceptable behavior and will take appropriate and fair corrective action in
|
|
43
|
-
response to any behavior that they deem inappropriate, threatening, offensive,
|
|
44
|
-
or harmful.
|
|
45
|
-
|
|
46
|
-
Community leaders have the right and responsibility to remove, edit, or reject
|
|
47
|
-
comments, commits, code, wiki edits, issues, and other contributions that are
|
|
48
|
-
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
|
49
|
-
decisions when appropriate.
|
|
50
|
-
|
|
51
|
-
## Scope
|
|
52
|
-
|
|
53
|
-
This Code of Conduct applies within all community spaces, and also applies when
|
|
54
|
-
an individual is officially representing the community in public spaces.
|
|
55
|
-
Examples of representing our community include using an official e-mail address,
|
|
56
|
-
posting via an official social media account, or acting as an appointed
|
|
57
|
-
representative at an online or offline event.
|
|
58
|
-
|
|
59
|
-
## Enforcement
|
|
60
|
-
|
|
61
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
62
|
-
reported to the community leaders responsible for enforcement at
|
|
63
|
-
contact@divlo.fr.
|
|
64
|
-
All complaints will be reviewed and investigated promptly and fairly.
|
|
65
|
-
|
|
66
|
-
All community leaders are obligated to respect the privacy and security of the
|
|
67
|
-
reporter of any incident.
|
|
68
|
-
|
|
69
|
-
## Enforcement Guidelines
|
|
70
|
-
|
|
71
|
-
Community leaders will follow these Community Impact Guidelines in determining
|
|
72
|
-
the consequences for any action they deem in violation of this Code of Conduct:
|
|
73
|
-
|
|
74
|
-
### 1. Correction
|
|
75
|
-
|
|
76
|
-
**Community Impact**: Use of inappropriate language or other behavior deemed
|
|
77
|
-
unprofessional or unwelcome in the community.
|
|
78
|
-
|
|
79
|
-
**Consequence**: A private, written warning from community leaders, providing
|
|
80
|
-
clarity around the nature of the violation and an explanation of why the
|
|
81
|
-
behavior was inappropriate. A public apology may be requested.
|
|
82
|
-
|
|
83
|
-
### 2. Warning
|
|
84
|
-
|
|
85
|
-
**Community Impact**: A violation through a single incident or series
|
|
86
|
-
of actions.
|
|
87
|
-
|
|
88
|
-
**Consequence**: A warning with consequences for continued behavior. No
|
|
89
|
-
interaction with the people involved, including unsolicited interaction with
|
|
90
|
-
those enforcing the Code of Conduct, for a specified period of time. This
|
|
91
|
-
includes avoiding interactions in community spaces as well as external channels
|
|
92
|
-
like social media. Violating these terms may lead to a temporary or
|
|
93
|
-
permanent ban.
|
|
94
|
-
|
|
95
|
-
### 3. Temporary Ban
|
|
96
|
-
|
|
97
|
-
**Community Impact**: A serious violation of community standards, including
|
|
98
|
-
sustained inappropriate behavior.
|
|
99
|
-
|
|
100
|
-
**Consequence**: A temporary ban from any sort of interaction or public
|
|
101
|
-
communication with the community for a specified period of time. No public or
|
|
102
|
-
private interaction with the people involved, including unsolicited interaction
|
|
103
|
-
with those enforcing the Code of Conduct, is allowed during this period.
|
|
104
|
-
Violating these terms may lead to a permanent ban.
|
|
105
|
-
|
|
106
|
-
### 4. Permanent Ban
|
|
107
|
-
|
|
108
|
-
**Community Impact**: Demonstrating a pattern of violation of community
|
|
109
|
-
standards, including sustained inappropriate behavior, harassment of an
|
|
110
|
-
individual, or aggression toward or disparagement of classes of individuals.
|
|
111
|
-
|
|
112
|
-
**Consequence**: A permanent ban from any sort of public interaction within
|
|
113
|
-
the community.
|
|
114
|
-
|
|
115
|
-
## Attribution
|
|
116
|
-
|
|
117
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
|
118
|
-
version 2.0, available at
|
|
119
|
-
[https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0].
|
|
120
|
-
|
|
121
|
-
Community Impact Guidelines were inspired by
|
|
122
|
-
[Mozilla's code of conduct enforcement ladder][mozilla coc].
|
|
123
|
-
|
|
124
|
-
For answers to common questions about this code of conduct, see the FAQ at
|
|
125
|
-
[https://www.contributor-covenant.org/faq][faq]. Translations are available
|
|
126
|
-
at [https://www.contributor-covenant.org/translations][translations].
|
|
127
|
-
|
|
128
|
-
[homepage]: https://www.contributor-covenant.org
|
|
129
|
-
[v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html
|
|
130
|
-
[mozilla coc]: https://github.com/mozilla/diversity
|
|
131
|
-
[faq]: https://www.contributor-covenant.org/faq
|
|
132
|
-
[translations]: https://www.contributor-covenant.org/translations
|
package/CONTRIBUTING.md
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
# 💡 Contributing
|
|
2
|
-
|
|
3
|
-
Thanks a lot for your interest in contributing to **eslint-config-conventions**! 🎉
|
|
4
|
-
|
|
5
|
-
## Types of contributions
|
|
6
|
-
|
|
7
|
-
- Reporting a bug.
|
|
8
|
-
- Suggest a new feature idea.
|
|
9
|
-
- Correct spelling errors, improvements or additions to documentation files (README, CONTRIBUTING...).
|
|
10
|
-
- Improve structure/format/performance/refactor/tests of the code.
|
|
11
|
-
|
|
12
|
-
## Pull Requests
|
|
13
|
-
|
|
14
|
-
- **Please first discuss** the change you wish to make via [issue](https://github.com/Divlo/eslint-config-conventions/issues) before making a change. It might avoid a waste of your time.
|
|
15
|
-
|
|
16
|
-
- Ensure your code respect linting.
|
|
17
|
-
|
|
18
|
-
- Make sure your **code passes the tests**.
|
|
19
|
-
|
|
20
|
-
If you're adding new features to **eslint-config-conventions**, please include tests.
|
|
21
|
-
|
|
22
|
-
## Commits
|
|
23
|
-
|
|
24
|
-
The commit message guidelines respect [@commitlint/config-conventional](https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional) and [Semantic Versioning](https://semver.org/) for releases.
|
|
25
|
-
|
|
26
|
-
### Types
|
|
27
|
-
|
|
28
|
-
Types define which kind of changes you made to the project.
|
|
29
|
-
|
|
30
|
-
| Types | Description |
|
|
31
|
-
| -------- | ------------------------------------------------------------------------------------------------------------ |
|
|
32
|
-
| feat | A new feature. |
|
|
33
|
-
| fix | A bug fix. |
|
|
34
|
-
| docs | Documentation only changes. |
|
|
35
|
-
| style | Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc). |
|
|
36
|
-
| refactor | A code change that neither fixes a bug nor adds a feature. |
|
|
37
|
-
| perf | A code change that improves performance. |
|
|
38
|
-
| test | Adding missing tests or correcting existing tests. |
|
|
39
|
-
| build | Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm). |
|
|
40
|
-
| ci | Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs). |
|
|
41
|
-
| chore | Other changes that don't modify src or test files. |
|
|
42
|
-
| revert | Reverts a previous commit. |
|
|
43
|
-
|
|
44
|
-
### Scopes
|
|
45
|
-
|
|
46
|
-
Scopes define what part of the code changed.
|
package/eslintrc.json
DELETED
package/test/basic.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
const tap = require('tap')
|
|
2
|
-
|
|
3
|
-
const config = require('../index.js')
|
|
4
|
-
|
|
5
|
-
tap.test('test basic properties of config', async (t) => {
|
|
6
|
-
t.ok(isObject(config.parserOptions))
|
|
7
|
-
t.ok(isObject(config.env))
|
|
8
|
-
t.ok(isObject(config.rules))
|
|
9
|
-
t.ok(isObject(config.overrides))
|
|
10
|
-
})
|
|
11
|
-
|
|
12
|
-
function isObject(object) {
|
|
13
|
-
return typeof object === 'object' && object !== null
|
|
14
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
'invalid eqeqeq' == 'invalid eqeqeq'
|
package/test/validate-config.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
const { ESLint } = require('eslint')
|
|
2
|
-
const tap = require('tap')
|
|
3
|
-
|
|
4
|
-
const eslint = new ESLint({
|
|
5
|
-
ignore: false,
|
|
6
|
-
useEslintrc: false,
|
|
7
|
-
overrideConfigFile: 'eslintrc.json'
|
|
8
|
-
})
|
|
9
|
-
|
|
10
|
-
tap.test('ensure we validate correctly JavaScript files', async (t) => {
|
|
11
|
-
const [noErrors] = await eslint.lintFiles(
|
|
12
|
-
'test/fixtures/javascript-no-errors.js'
|
|
13
|
-
)
|
|
14
|
-
const [withErrors] = await eslint.lintFiles(
|
|
15
|
-
'test/fixtures/javascript-with-errors.js'
|
|
16
|
-
)
|
|
17
|
-
t.equal(noErrors.errorCount, 0)
|
|
18
|
-
t.equal(withErrors.errorCount, 3)
|
|
19
|
-
})
|
|
20
|
-
|
|
21
|
-
tap.test('ensure we validate correctly TypeScript files', async (t) => {
|
|
22
|
-
const [noErrors] = await eslint.lintFiles(
|
|
23
|
-
'test/fixtures/typescript-no-errors.ts'
|
|
24
|
-
)
|
|
25
|
-
const [withErrors] = await eslint.lintFiles(
|
|
26
|
-
'test/fixtures/javascript-with-errors.js'
|
|
27
|
-
)
|
|
28
|
-
t.equal(noErrors.errorCount, 0)
|
|
29
|
-
t.equal(withErrors.errorCount, 3)
|
|
30
|
-
})
|
|
31
|
-
|
|
32
|
-
tap.test('ensure we allow top-level await', async (t) => {
|
|
33
|
-
const [lintResult] = await eslint.lintFiles(
|
|
34
|
-
'test/fixtures/top-level-await.mjs'
|
|
35
|
-
)
|
|
36
|
-
t.equal(lintResult.errorCount, 0)
|
|
37
|
-
})
|