@qlik/eslint-config 0.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/LICENSE ADDED
@@ -0,0 +1,17 @@
1
+ ISC License
2
+
3
+ Copyright (c) 2023 Qlik
4
+
5
+ Permission to use, copy, modify, and/or distribute this software
6
+ for any purpose with or without fee is hereby granted, provided
7
+ that the above copyright notice and this permission notice appear
8
+ in all copies.
9
+
10
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11
+ WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12
+ WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13
+ AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
14
+ CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
15
+ OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
16
+ NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
17
+ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,67 @@
1
+ # @qlik/eslint-config
2
+
3
+ ESlint config for pure javascript/typescript environments. Based on airbnb-base/prettier config with some modifications.
4
+
5
+ ## usage
6
+
7
+ Simplest approach is to add one of the following field in `package.json`:
8
+
9
+ For a pure javascript environment use:
10
+
11
+ ```json
12
+ "eslintConfig": {
13
+ "extends": [
14
+ "@qlik/eslint-config"
15
+ ],
16
+ "root": true
17
+ },
18
+ ```
19
+
20
+ To enable linting on typescript (.ts, .tsx):
21
+
22
+ ```json
23
+ "eslintConfig": {
24
+ "extends": [
25
+ "@qlik/eslint-config/typescript"
26
+ ],
27
+ "root": true
28
+ },
29
+ ```
30
+
31
+ For a node environment with commonjs modules use:
32
+
33
+ ```json
34
+ "eslintConfig": {
35
+ "extends": [
36
+ "@qlik/eslint-config/node"
37
+ ],
38
+ "root": true
39
+ },
40
+ ```
41
+
42
+ For a node environment with ES modules use:
43
+
44
+ ```json
45
+ "eslintConfig": {
46
+ "extends": [
47
+ "@qlik/eslint-config/node-esm"
48
+ ],
49
+ "root": true
50
+ },
51
+ ```
52
+
53
+ Additional configs that can be used in conjunction with the above:
54
+
55
+ ```json
56
+ "eslintConfig": {
57
+ "extends": [
58
+ "...",
59
+ "@qlik/eslint-config/jest" // adds linting on jest test and config files
60
+ // OR
61
+ "@qlik/eslint-config/vitest" // adds linting on vitest test and config files
62
+ // AND/OR
63
+ "@qlik/eslint-config/playwright" // adds linting on playwright test and config files
64
+ ],
65
+ "root": true
66
+ },
67
+ ```
package/index.js ADDED
@@ -0,0 +1,6 @@
1
+ module.exports = {
2
+ parserOptions: {
3
+ ecmaVersion: 2020,
4
+ },
5
+ extends: ["airbnb-base", "@qlik/eslint-config-base", "prettier"],
6
+ };
package/jest.js ADDED
@@ -0,0 +1,3 @@
1
+ const jest = require("@qlik/eslint-config-base/jest");
2
+
3
+ module.exports = jest;
package/node-esm.js ADDED
@@ -0,0 +1,14 @@
1
+ module.exports = {
2
+ parserOptions: {
3
+ ecmaVersion: 2020,
4
+ },
5
+ env: {
6
+ node: true,
7
+ browser: false,
8
+ },
9
+ extends: ["airbnb-base", "@qlik/eslint-config-base", "prettier"],
10
+ rules: {
11
+ "no-console": "off",
12
+ "import/extensions": ["error", "ignorePackages"],
13
+ },
14
+ };
package/node.js ADDED
@@ -0,0 +1,13 @@
1
+ module.exports = {
2
+ parserOptions: {
3
+ ecmaVersion: 2020,
4
+ },
5
+ env: {
6
+ node: true,
7
+ browser: false,
8
+ },
9
+ extends: ["airbnb-base", "@qlik/eslint-config-base", "prettier"],
10
+ rules: {
11
+ "no-console": "off",
12
+ },
13
+ };
package/package.json ADDED
@@ -0,0 +1,52 @@
1
+ {
2
+ "name": "@qlik/eslint-config",
3
+ "version": "0.0.1",
4
+ "description": "Qlik's ESLint config",
5
+ "repository": "git@github.com:qlik-oss/dev-tools-js.git",
6
+ "license": "ISC",
7
+ "main": "index.js",
8
+ "files": [
9
+ "node.js",
10
+ "node-esm.js",
11
+ "jest.js",
12
+ "playwright.js",
13
+ "typescript.js",
14
+ "vitest.js"
15
+ ],
16
+ "prettier": "@qlik/prettier-config",
17
+ "eslintConfig": {
18
+ "extends": "./node.js"
19
+ },
20
+ "dependencies": {
21
+ "@typescript-eslint/eslint-plugin": "5.55.0",
22
+ "@typescript-eslint/parser": "5.55.0",
23
+ "eslint-config-airbnb-base": "15.0.0",
24
+ "eslint-config-airbnb-typescript": "17.0.0",
25
+ "eslint-config-prettier": "8.7.0",
26
+ "eslint-plugin-import": "2.27.5",
27
+ "@qlik/eslint-config-base": "0.0.1"
28
+ },
29
+ "devDependencies": {
30
+ "eslint": "8.36.0",
31
+ "prettier": "2.8.6",
32
+ "@qlik/prettier-config": "0.0.1"
33
+ },
34
+ "peerDependencies": {
35
+ "eslint": "*"
36
+ },
37
+ "optionalDependencies": {
38
+ "typescript": "*"
39
+ },
40
+ "engines": {
41
+ "node": ">=12.0.0"
42
+ },
43
+ "publishConfig": {
44
+ "access": "public",
45
+ "registry": "https://registry.npmjs.org/"
46
+ },
47
+ "scripts": {
48
+ "format:check": "prettier --check '**' --ignore-unknown",
49
+ "format:write": "prettier --write '**' --ignore-unknown",
50
+ "lint": "eslint ."
51
+ }
52
+ }
package/playwright.js ADDED
@@ -0,0 +1,3 @@
1
+ const playwright = require("@qlik/eslint-config-base/playwright");
2
+
3
+ module.exports = playwright;
package/typescript.js ADDED
@@ -0,0 +1,9 @@
1
+ module.exports = {
2
+ extends: ["./index.js"],
3
+ overrides: [
4
+ {
5
+ files: ["**/*.ts", "**/*.tsx"],
6
+ extends: ["airbnb-base", "airbnb-typescript/base", "@qlik/eslint-config-base/typescript", "prettier"],
7
+ },
8
+ ],
9
+ };
package/vitest.js ADDED
@@ -0,0 +1,3 @@
1
+ const vitest = require("@qlik/eslint-config-base/vitest");
2
+
3
+ module.exports = vitest;