@frontify/eslint-config-basic 0.14.0 → 0.15.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.
Files changed (2) hide show
  1. package/index.js +132 -5
  2. package/package.json +10 -4
package/index.js CHANGED
@@ -4,10 +4,89 @@ module.exports = {
4
4
  browser: true,
5
5
  node: true,
6
6
  },
7
+ plugins: ["html", "unicorn", "prettier"],
8
+ extends: [
9
+ "plugin:jsonc/recommended-with-jsonc",
10
+ "plugin:prettier/recommended",
11
+ ],
12
+ overrides: [
13
+ {
14
+ files: ["*.json", "*.json5"],
15
+ parser: "jsonc-eslint-parser",
16
+ rules: {
17
+ quotes: ["error", "double"],
18
+ "quote-props": ["error", "always"],
19
+ "comma-dangle": ["error", "never"],
20
+ },
21
+ },
22
+ {
23
+ files: ["*.yaml", "*.yml"],
24
+ parser: "yaml-eslint-parser",
25
+ },
26
+ {
27
+ files: ["package.json"],
28
+ parser: "jsonc-eslint-parser",
29
+ rules: {
30
+ "jsonc/sort-keys": [
31
+ "error",
32
+ {
33
+ pathPattern: "^$",
34
+ order: [
35
+ "name",
36
+ "version",
37
+ "description",
38
+ "keywords",
39
+ "license",
40
+ "repository",
41
+ "funding",
42
+ "author",
43
+ "type",
44
+ "files",
45
+ "exports",
46
+ "main",
47
+ "module",
48
+ "unpkg",
49
+ "bin",
50
+ "scripts",
51
+ "husky",
52
+ "lint-staged",
53
+ "peerDependencies",
54
+ "peerDependenciesMeta",
55
+ "dependencies",
56
+ "devDependencies",
57
+ "eslintConfig",
58
+ ],
59
+ },
60
+ {
61
+ pathPattern: "^(?:dev|peer|optional|bundled)?[Dd]ependencies$",
62
+ order: { type: "asc" },
63
+ },
64
+ ],
65
+ },
66
+ },
67
+ {
68
+ files: ["*.js"],
69
+ rules: {
70
+ "@typescript-eslint/no-var-requires": "off",
71
+ },
72
+ },
73
+ {
74
+ files: ["scripts/**/*.*"],
75
+ rules: {
76
+ "no-console": "off",
77
+ },
78
+ },
79
+ {
80
+ files: ["*.test.ts", "*.test.js", "*.spec.ts", "*.spec.js"],
81
+ rules: {
82
+ "no-unused-expressions": "off",
83
+ },
84
+ },
85
+ ],
7
86
  rules: {
8
87
  "linebreak-style": ["error", "unix"],
9
- "prettier/prettier": "error",
10
88
  "prefer-template": "error",
89
+ "template-curly-spacing": "error",
11
90
  "no-useless-concat": "error",
12
91
  "prefer-arrow-callback": "error",
13
92
  "no-var": "error",
@@ -15,9 +94,57 @@ module.exports = {
15
94
  eqeqeq: "error",
16
95
  "no-eval": "error",
17
96
  "no-extra-bind": "error",
18
- curly: "error",
19
- "import/no-default-export": "error",
97
+ curly: ["error", "all"],
98
+ semi: ["error", "always"],
99
+ quotes: ["error", "double", { avoidEscape: true }],
100
+ "vars-on-top": "error",
101
+ "block-scoped-var": "error",
102
+ "array-callback-return": "error",
103
+ "object-shorthand": [
104
+ "error",
105
+ "always",
106
+ {
107
+ ignoreConstructors: false,
108
+ avoidQuotes: true,
109
+ },
110
+ ],
111
+
112
+ "unicorn/error-message": "error",
113
+ "unicorn/escape-case": "error",
114
+ "unicorn/no-array-instanceof": "error",
115
+ "unicorn/no-new-buffer": "error",
116
+ "unicorn/no-unsafe-regex": "off",
117
+ "unicorn/number-literal-case": "error",
118
+ "unicorn/prefer-exponentiation-operator": "error",
119
+ "unicorn/prefer-includes": "error",
120
+ "unicorn/prefer-starts-ends-with": "error",
121
+ "unicorn/prefer-text-content": "error",
122
+ "unicorn/prefer-type-error": "error",
123
+ "unicorn/throw-new-error": "error",
124
+ "unicorn/prefer-string-replace-all": "error",
125
+ "unicorn/prefer-default-parameters": "error",
126
+ "unicorn/prefer-array-find": "error",
127
+ "unicorn/no-array-for-each": "error",
128
+ "unicorn/error-message": "error",
129
+ "unicorn/custom-error-definition": "error",
130
+ "unicorn/better-regex": "error",
131
+ "unicorn/explicit-length-check": "error",
132
+ "unicorn/no-await-expression-member": "error",
133
+ "unicorn/no-nested-ternary": "error",
134
+ "unicorn/no-new-array": "error",
135
+ "unicorn/no-this-assignment": "error",
136
+ "unicorn/no-unsafe-regex": "error",
137
+ "unicorn/no-useless-length-check": "error",
20
138
  },
21
- plugins: ["html", "prettier", "import"],
22
- extends: ["plugin:prettier/recommended"],
139
+
140
+ "sort-imports": [
141
+ "error",
142
+ {
143
+ ignoreCase: false,
144
+ ignoreDeclarationSort: true,
145
+ ignoreMemberSort: false,
146
+ memberSyntaxSortOrder: ["none", "all", "multiple", "single"],
147
+ allowSeparatedGroups: false,
148
+ },
149
+ ],
23
150
  };
package/package.json CHANGED
@@ -1,9 +1,14 @@
1
1
  {
2
2
  "name": "@frontify/eslint-config-basic",
3
- "version": "0.14.0",
3
+ "version": "0.15.0",
4
4
  "main": "index.js",
5
5
  "author": "Frontify Developers <developers@frontify.com>",
6
6
  "license": "MIT",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/Frontify/eslint-config",
10
+ "directory": "packages/basic"
11
+ },
7
12
  "scripts": {
8
13
  "lint": "eslint . --config=index.js"
9
14
  },
@@ -19,10 +24,11 @@
19
24
  "dependencies": {
20
25
  "eslint-config-prettier": "^8.3.0",
21
26
  "eslint-plugin-html": "^6.2.0",
22
- "eslint-plugin-import": "^2.25.3",
27
+ "eslint-plugin-jsonc": "^2.1.0",
23
28
  "eslint-plugin-node": "^11.1.0",
24
29
  "eslint-plugin-prettier": "^4.0.0",
25
- "eslint-plugin-promise": "^6.0.0"
30
+ "eslint-plugin-promise": "^6.0.0",
31
+ "eslint-plugin-unicorn": "^40.1.0"
26
32
  },
27
- "gitHead": "1ec3d0fd7a52c2c795050d6796582044c3a475a0"
33
+ "gitHead": "545c50fb39e5252e3c8df528e9cf0f24b0ee07f9"
28
34
  }