@open-turo/eslint-config 1.0.0

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.
@@ -0,0 +1,4 @@
1
+ extends:
2
+ - "@commitlint/config-conventional"
3
+ rules:
4
+ body-max-line-length: [2, always, 500]
@@ -0,0 +1,10 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: npm
4
+ directory: /
5
+ schedule:
6
+ interval: weekly
7
+ commit-message:
8
+ prefix: build(deps)
9
+ prefix-development: build(dev-deps)
10
+ include: scope
@@ -0,0 +1,19 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+
6
+ jobs:
7
+ lint:
8
+ name: Lint
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - uses: actions/checkout@v2
12
+ with:
13
+ fetch-depth: 0
14
+ - uses: wagoid/commitlint-github-action@v4
15
+ - uses: actions/setup-python@v2
16
+ - uses: KeisukeYamashita/setup-release@v1.0.2
17
+ with:
18
+ repository: rhysd/actionlint
19
+ - uses: pre-commit/action@v2.0.0
@@ -0,0 +1,23 @@
1
+ name: Release
2
+ on:
3
+ push:
4
+ branches:
5
+ - main
6
+ - next
7
+
8
+ jobs:
9
+ release:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v2
13
+ with:
14
+ fetch-depth: 0
15
+ - name: Semantic Release
16
+ id: release
17
+ uses: cycjimmy/semantic-release-action@v2
18
+ with:
19
+ extra_plugins: |
20
+ semantic-release-github-pullrequest
21
+ env:
22
+ GITHUB_TOKEN: ${{ secrets.OPEN_TURO_GITHUB_TOKEN }}
23
+ NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
package/.nvmrc ADDED
@@ -0,0 +1 @@
1
+ lts/gallium
@@ -0,0 +1,23 @@
1
+ repos:
2
+ - repo: https://github.com/pre-commit/pre-commit-hooks
3
+ rev: v4.1.0
4
+ hooks:
5
+ - id: check-json
6
+ - id: check-yaml
7
+ - id: end-of-file-fixer
8
+ - id: trailing-whitespace
9
+ - repo: https://github.com/pre-commit/mirrors-prettier
10
+ rev: v2.5.1
11
+ hooks:
12
+ - id: prettier
13
+ stages: [commit]
14
+ - repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
15
+ rev: v8.0.0
16
+ hooks:
17
+ - id: commitlint
18
+ stages: [commit-msg]
19
+ additional_dependencies: ["@commitlint/config-conventional"]
20
+ - repo: https://github.com/rhysd/actionlint
21
+ rev: v1.6.8
22
+ hooks:
23
+ - id: actionlint
@@ -0,0 +1,26 @@
1
+ {
2
+ "branches": ["main", "next"],
3
+ "plugins": [
4
+ "@semantic-release/commit-analyzer",
5
+ "@semantic-release/release-notes-generator",
6
+ [
7
+ "@semantic-release/npm",
8
+ {
9
+ "tarballDir": "pack"
10
+ }
11
+ ],
12
+ [
13
+ "@semantic-release/github",
14
+ {
15
+ "assets": "pack/*.tgz"
16
+ }
17
+ ],
18
+ [
19
+ "semantic-release-github-pullrequest",
20
+ {
21
+ "assets": ["package.json", "README.md", "package-lock.json"],
22
+ "baseRef": "main"
23
+ }
24
+ ]
25
+ ]
26
+ }
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 Turo Open Source
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.
package/README.md ADDED
@@ -0,0 +1,17 @@
1
+ # `@open-turo/eslint-config`
2
+
3
+ Turo eslint configuration
4
+
5
+ ## Usage
6
+
7
+ Install the package and all of its peer dependencies:
8
+
9
+ ```shell
10
+ npx install-peerdeps --dev @open-turo/eslint-config
11
+ ```
12
+
13
+ Then in your `.eslintrc` file add:
14
+
15
+ ```
16
+ "extends": "@open-turo/eslint-config"
17
+ ```
package/index.js ADDED
@@ -0,0 +1,45 @@
1
+ module.exports = {
2
+ extends: [
3
+ "eslint-config-airbnb-base",
4
+ "eslint:recommended",
5
+ "prettier",
6
+ "plugin:sonarjs/recommended",
7
+ "plugin:import/errors",
8
+ "plugin:import/warnings",
9
+ "plugin:jest/recommended",
10
+ "plugin:unicorn/recommended",
11
+ "plugin:node/recommended",
12
+ ],
13
+ plugins: [
14
+ "import",
15
+ "json",
16
+ "import",
17
+ "jest",
18
+ "prettier",
19
+ "simple-import-sort",
20
+ "sonarjs",
21
+ "sort-destructure-keys",
22
+ "unicorn",
23
+ "node",
24
+ ],
25
+ rules: {
26
+ parserOptions: {
27
+ ecmaVersion: 2020,
28
+ sourceType: "module",
29
+ ecmaFeatures: {
30
+ modules: true,
31
+ },
32
+ },
33
+ rules: {
34
+ "import/default": "off",
35
+ "import/named": "off",
36
+ "import/namespace": "off",
37
+ "import/no-default-export": "error",
38
+ "import/prefer-default-export": "off",
39
+ "prettier/prettier": "error",
40
+ "simple-import-sort/imports": "error",
41
+ "simple-import-sort/exports": "error",
42
+ "sort-destructure-keys/sort-destructure-keys": "error",
43
+ },
44
+ },
45
+ };
package/package.json ADDED
@@ -0,0 +1,46 @@
1
+ {
2
+ "author": "Turo engineering",
3
+ "description": "Eslint configuration for Turo",
4
+ "devDependencies": {
5
+ "@commitlint/cli": "^16.2.1",
6
+ "@commitlint/config-conventional": "^16.2.1",
7
+ "@semantic-release/git": "^10.0.1",
8
+ "eslint": "^8.10.0",
9
+ "eslint-config-airbnb-base": "^15.0.0",
10
+ "eslint-config-prettier": "^8.5.0",
11
+ "eslint-plugin-import": "^2.25.4",
12
+ "eslint-plugin-jest": "^26.1.1",
13
+ "eslint-plugin-json": "^3.1.0",
14
+ "eslint-plugin-prettier": "^4.0.0",
15
+ "eslint-plugin-simple-import-sort": "^7.0.0",
16
+ "eslint-plugin-sonarjs": "^0.12.0",
17
+ "eslint-plugin-sort-destructure-keys": "^1.4.0",
18
+ "prettier": "^2.5.1",
19
+ "semantic-release": "^19.0.2",
20
+ "semantic-release-github-pullrequest": "^1.3.0"
21
+ },
22
+ "engines": {
23
+ "node": ">= 14"
24
+ },
25
+ "homepage": "https://github.com/open-turo/eslint-config#readme",
26
+ "license": "MIT",
27
+ "main": "index.js",
28
+ "name": "@open-turo/eslint-config",
29
+ "peerDependencies": {
30
+ "eslint": "^8.10.0",
31
+ "eslint-config-airbnb-base": "^15.0.0",
32
+ "eslint-config-prettier": "^8.5.0",
33
+ "eslint-plugin-import": "^2.25.4",
34
+ "eslint-plugin-jest": "^26.1.1",
35
+ "eslint-plugin-json": "^3.1.0",
36
+ "eslint-plugin-prettier": "^4.0.0",
37
+ "eslint-plugin-simple-import-sort": "^7.0.0",
38
+ "eslint-plugin-sonarjs": "^0.12.0",
39
+ "eslint-plugin-sort-destructure-keys": "^1.4.0"
40
+ },
41
+ "publishConfig": {
42
+ "access": "public"
43
+ },
44
+ "repository": "https://github.com/open-turo/eslint-config",
45
+ "version": "1.0.0"
46
+ }