@so1ve/eslint-config 1.1.1 → 1.3.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.
package/dist/index.cjs CHANGED
@@ -7,6 +7,7 @@ var pluginHtml = require('@html-eslint/eslint-plugin');
7
7
  var parserHtml = require('@html-eslint/parser');
8
8
  var pluginSo1ve = require('@so1ve/eslint-plugin');
9
9
  var pluginSortImports = require('@so1ve/eslint-plugin-sort-imports');
10
+ var pluginStylistic = require('@stylistic/eslint-plugin');
10
11
  var pluginTs = require('@typescript-eslint/eslint-plugin');
11
12
  var parserTs = require('@typescript-eslint/parser');
12
13
  var eslintMdx = require('eslint-mdx');
@@ -65,6 +66,7 @@ var pluginHtml__default = /*#__PURE__*/_interopDefaultLegacy(pluginHtml);
65
66
  var parserHtml__default = /*#__PURE__*/_interopDefaultLegacy(parserHtml);
66
67
  var pluginSo1ve__default = /*#__PURE__*/_interopDefaultLegacy(pluginSo1ve);
67
68
  var pluginSortImports__default = /*#__PURE__*/_interopDefaultLegacy(pluginSortImports);
69
+ var pluginStylistic__default = /*#__PURE__*/_interopDefaultLegacy(pluginStylistic);
68
70
  var pluginTs__default = /*#__PURE__*/_interopDefaultLegacy(pluginTs);
69
71
  var parserTs__default = /*#__PURE__*/_interopDefaultLegacy(parserTs);
70
72
  var eslintMdx__default = /*#__PURE__*/_interopDefaultLegacy(eslintMdx);
@@ -193,6 +195,11 @@ const GLOB_EXCLUDE = [
193
195
  const formatting = (options) => {
194
196
  var _a, _b;
195
197
  return [
198
+ {
199
+ plugins: {
200
+ style: pluginStylistic__default["default"]
201
+ }
202
+ },
196
203
  {
197
204
  rules: {
198
205
  "so1ve/no-useless-template-string": "error",
@@ -200,8 +207,8 @@ const formatting = (options) => {
200
207
  "so1ve/no-import-promises-as": "error",
201
208
  "so1ve/pad-after-last-import": "error",
202
209
  "so1ve/function-style": "error",
203
- "quote-props": ["error", "consistent-as-needed"],
204
- "padding-line-between-statements": [
210
+ "style/quote-props": ["error", "consistent-as-needed"],
211
+ "style/padding-line-between-statements": [
205
212
  "error",
206
213
  { blankLine: "always", prev: "*", next: "return" }
207
214
  ]
@@ -509,6 +516,9 @@ const javascript = ({
509
516
  },
510
517
  sourceType: "module"
511
518
  },
519
+ linterOptions: {
520
+ reportUnusedDisableDirectives: true
521
+ },
512
522
  rules: {
513
523
  // Common
514
524
  "array-bracket-newline": "off",
@@ -1156,6 +1166,9 @@ function typescript({
1156
1166
  "ts/consistent-type-definitions": ["error", "interface"],
1157
1167
  "ts/consistent-indexed-object-style": ["error", "record"],
1158
1168
  "ts/prefer-ts-expect-error": "error",
1169
+ "ts/prefer-for-of": "error",
1170
+ "ts/no-duplicate-enum-values": "error",
1171
+ "ts/no-non-null-asserted-nullish-coalescing": "error",
1159
1172
  "ts/no-require-imports": "error",
1160
1173
  "ts/method-signature-style": ["error", "property"],
1161
1174
  "ts/explicit-member-accessibility": [
@@ -1205,9 +1218,6 @@ function typescript({
1205
1218
  "ts/no-non-null-assertion": "off",
1206
1219
  "ts/explicit-module-boundary-types": "off",
1207
1220
  "ts/triple-slash-reference": "off",
1208
- "ts/prefer-for-of": "error",
1209
- "ts/no-duplicate-enum-values": "error",
1210
- "ts/no-non-null-asserted-nullish-coalescing": "error",
1211
1221
  // handled by unused-imports/no-unused-imports
1212
1222
  "ts/no-unused-vars": "off",
1213
1223
  ...overrides
@@ -1671,6 +1681,10 @@ Object.defineProperty(exports, 'pluginSortImports', {
1671
1681
  enumerable: true,
1672
1682
  get: function () { return pluginSortImports__default["default"]; }
1673
1683
  });
1684
+ Object.defineProperty(exports, 'pluginStylistic', {
1685
+ enumerable: true,
1686
+ get: function () { return pluginStylistic__default["default"]; }
1687
+ });
1674
1688
  Object.defineProperty(exports, 'pluginTs', {
1675
1689
  enumerable: true,
1676
1690
  get: function () { return pluginTs__default["default"]; }
package/dist/index.d.ts CHANGED
@@ -8,6 +8,7 @@ export { default as pluginComments } from '@eslint-community/eslint-plugin-eslin
8
8
  export { default as pluginHtml } from '@html-eslint/eslint-plugin';
9
9
  export { default as parserHtml } from '@html-eslint/parser';
10
10
  export { default as pluginSortImports } from '@so1ve/eslint-plugin-sort-imports';
11
+ export { default as pluginStylistic } from '@stylistic/eslint-plugin';
11
12
  export { default as pluginTs } from '@typescript-eslint/eslint-plugin';
12
13
  export { default as parserMdx } from 'eslint-mdx';
13
14
  export { default as pluginArrayFunc } from 'eslint-plugin-array-func';
package/dist/index.mjs CHANGED
@@ -8,6 +8,8 @@ import pluginSo1ve from '@so1ve/eslint-plugin';
8
8
  export { default as pluginSo1ve } from '@so1ve/eslint-plugin';
9
9
  import pluginSortImports from '@so1ve/eslint-plugin-sort-imports';
10
10
  export { default as pluginSortImports } from '@so1ve/eslint-plugin-sort-imports';
11
+ import pluginStylistic from '@stylistic/eslint-plugin';
12
+ export { default as pluginStylistic } from '@stylistic/eslint-plugin';
11
13
  import pluginTs from '@typescript-eslint/eslint-plugin';
12
14
  export { default as pluginTs } from '@typescript-eslint/eslint-plugin';
13
15
  import parserTs from '@typescript-eslint/parser';
@@ -164,6 +166,11 @@ const GLOB_EXCLUDE = [
164
166
  const formatting = (options) => {
165
167
  var _a, _b;
166
168
  return [
169
+ {
170
+ plugins: {
171
+ style: pluginStylistic
172
+ }
173
+ },
167
174
  {
168
175
  rules: {
169
176
  "so1ve/no-useless-template-string": "error",
@@ -171,8 +178,8 @@ const formatting = (options) => {
171
178
  "so1ve/no-import-promises-as": "error",
172
179
  "so1ve/pad-after-last-import": "error",
173
180
  "so1ve/function-style": "error",
174
- "quote-props": ["error", "consistent-as-needed"],
175
- "padding-line-between-statements": [
181
+ "style/quote-props": ["error", "consistent-as-needed"],
182
+ "style/padding-line-between-statements": [
176
183
  "error",
177
184
  { blankLine: "always", prev: "*", next: "return" }
178
185
  ]
@@ -480,6 +487,9 @@ const javascript = ({
480
487
  },
481
488
  sourceType: "module"
482
489
  },
490
+ linterOptions: {
491
+ reportUnusedDisableDirectives: true
492
+ },
483
493
  rules: {
484
494
  // Common
485
495
  "array-bracket-newline": "off",
@@ -1127,6 +1137,9 @@ function typescript({
1127
1137
  "ts/consistent-type-definitions": ["error", "interface"],
1128
1138
  "ts/consistent-indexed-object-style": ["error", "record"],
1129
1139
  "ts/prefer-ts-expect-error": "error",
1140
+ "ts/prefer-for-of": "error",
1141
+ "ts/no-duplicate-enum-values": "error",
1142
+ "ts/no-non-null-asserted-nullish-coalescing": "error",
1130
1143
  "ts/no-require-imports": "error",
1131
1144
  "ts/method-signature-style": ["error", "property"],
1132
1145
  "ts/explicit-member-accessibility": [
@@ -1176,9 +1189,6 @@ function typescript({
1176
1189
  "ts/no-non-null-assertion": "off",
1177
1190
  "ts/explicit-module-boundary-types": "off",
1178
1191
  "ts/triple-slash-reference": "off",
1179
- "ts/prefer-for-of": "error",
1180
- "ts/no-duplicate-enum-values": "error",
1181
- "ts/no-non-null-asserted-nullish-coalescing": "error",
1182
1192
  // handled by unused-imports/no-unused-imports
1183
1193
  "ts/no-unused-vars": "off",
1184
1194
  ...overrides
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@so1ve/eslint-config",
3
- "version": "1.1.1",
3
+ "version": "1.3.0",
4
4
  "author": "Ray <i@mk1.io> (https://github.com/so1ve/)",
5
5
  "description": "Ray's eslint config.",
6
6
  "keywords": [
@@ -35,6 +35,7 @@
35
35
  "@eslint-community/eslint-plugin-eslint-comments": "^4.0.0",
36
36
  "@html-eslint/eslint-plugin": "^0.19.1",
37
37
  "@html-eslint/parser": "^0.19.1",
38
+ "@stylistic/eslint-plugin": "^1.6.0",
38
39
  "@typescript-eslint/eslint-plugin": "^6.2.0",
39
40
  "@typescript-eslint/parser": "^6.2.0",
40
41
  "@unocss/eslint-config": "^0.55.0",
@@ -71,8 +72,8 @@
71
72
  "toml-eslint-parser": "^0.6.0",
72
73
  "vue-eslint-parser": "^9.3.1",
73
74
  "yaml-eslint-parser": "^1.2.2",
74
- "@so1ve/eslint-plugin": "1.1.1",
75
- "@so1ve/eslint-plugin-sort-imports": "1.1.1"
75
+ "@so1ve/eslint-plugin": "1.3.0",
76
+ "@so1ve/eslint-plugin-sort-imports": "1.3.0"
76
77
  },
77
78
  "devDependencies": {
78
79
  "eslint": "^8.46.0"