@hexadrop/eslint-config 0.0.1-beta.0 → 0.0.1-beta.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2021-2023 hexadrop
3
+ Copyright (c) 2021-2024 Hexadrop
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  <h1 align="center">
2
- hexadrop's ESLint configuration
2
+ Hexadrop's ESLint configuration
3
3
  </h1>
4
4
 
5
5
  <p align="center">
@@ -19,10 +19,6 @@ npm install --save-dev eslint @hexadrop/eslint-config
19
19
  bun add eslint @hexadrop/eslint-config --dev
20
20
  ```
21
21
 
22
- > [!IMPORTANT]
23
- > Since v4.0.0, this config is rewritten to the
24
- > new [ESLint Flat config](https://eslint.org/docs/latest/use/configure/configuration-files-new).
25
-
26
22
  ## What it does
27
23
 
28
24
  - Auto fix for formatting (aimed to be used standalone **without** Prettier)
@@ -69,8 +65,6 @@ bun add eslint @hexadrop/eslint-config --dev
69
65
 
70
66
  ## Customization
71
67
 
72
- Since v4.0, we migrated to [ESLint Flat config](https://eslint.org/docs/latest/use/configure/configuration-files-new). It provides much better organization and composition.
73
-
74
68
  Normally you only need to import the `hexadrop` preset:
75
69
 
76
70
  ```js
@@ -204,7 +198,7 @@ export default hexadrop(
204
198
 
205
199
  ### Config Composer
206
200
 
207
- Since v2.10.0, the factory function `hexadrop()` returns a [`FlatConfigComposer` object from `eslint-flat-config-utils`](https://github.com/antfu/eslint-flat-config-utils#composer) where you can chain the methods to compose the config even more flexibly.
201
+ The factory function `hexadrop()` returns a [`FlatConfigComposer` object from `eslint-flat-config-utils`](https://github.com/antfu/eslint-flat-config-utils#composer) where you can chain the methods to compose the config even more flexibly.
208
202
 
209
203
  ```js
210
204
  // eslint.config.js
@@ -260,7 +254,7 @@ There is a [visual tool](https://github.com/eslint/config-inspector) to help you
260
254
  Go to your project root that contains `eslint.config.js` and run:
261
255
 
262
256
  ```bash
263
- bunx @eslint/config-inspector
257
+ npx @eslint/config-inspector
264
258
  ```
265
259
 
266
260
  ## Inspiration and Credits
package/dist/index.cjs CHANGED
@@ -280,6 +280,7 @@ var MARKDOWN_CONFIG_NAME_SETUP_PARSER = `${MARKDOWN_CONFIG_NAME_SETUP}/parser`;
280
280
  // src/config/core/core.globs.ts
281
281
  var SOURCE_GLOBS = ["**/*.?([cm])[jt]s?(x)"];
282
282
  var JAVASCRIPT_GLOBS = ["**/*.?([cm])js?(x)"];
283
+ var ESLINT_CONFIG_GLOBS = ["**/eslint.config.js"];
283
284
 
284
285
  // src/config/json/json.config-name.ts
285
286
  var JSON_CONFIG_NAME = `${plugin_prefix_default}/json`;
@@ -988,20 +989,17 @@ async function imports(options) {
988
989
  [`${importXPluginRename}/no-dynamic-require`]: "error"
989
990
  }
990
991
  }
992
+ },
993
+ {
994
+ files: ESLINT_CONFIG_GLOBS,
995
+ name: IMPORTS_CONFIG_NAME_RULES_WARNINGS_ESLINT_CONFIG,
996
+ rules: {
997
+ [`${importXPluginRename}/default`]: "off",
998
+ [`${importXPluginRename}/no-deprecated`]: "off",
999
+ [`${importXPluginRename}/no-named-as-default`]: "off",
1000
+ [`${importXPluginRename}/no-named-as-default-member`]: "off"
1001
+ }
991
1002
  }
992
- /*
993
- * TODO: Decide if we want to keep these rules
994
- * {
995
- * files: ESLINT_CONFIG_GLOBS,
996
- * name: IMPORTS_CONFIG_NAME_RULES_WARNINGS_ESLINT_CONFIG,
997
- * rules: {
998
- * [`${importXPluginRename}/default`]: 'off',
999
- * [`${importXPluginRename}/no-deprecated`]: 'off',
1000
- * [`${importXPluginRename}/no-named-as-default`]: 'off',
1001
- * [`${importXPluginRename}/no-named-as-default-member`]: 'off',
1002
- * },
1003
- * }
1004
- */
1005
1003
  );
1006
1004
  if (markdown2) {
1007
1005
  configs.push({
package/dist/index.js CHANGED
@@ -243,6 +243,7 @@ var MARKDOWN_CONFIG_NAME_SETUP_PARSER = `${MARKDOWN_CONFIG_NAME_SETUP}/parser`;
243
243
  // src/config/core/core.globs.ts
244
244
  var SOURCE_GLOBS = ["**/*.?([cm])[jt]s?(x)"];
245
245
  var JAVASCRIPT_GLOBS = ["**/*.?([cm])js?(x)"];
246
+ var ESLINT_CONFIG_GLOBS = ["**/eslint.config.js"];
246
247
 
247
248
  // src/config/json/json.config-name.ts
248
249
  var JSON_CONFIG_NAME = `${plugin_prefix_default}/json`;
@@ -951,20 +952,17 @@ async function imports(options) {
951
952
  [`${importXPluginRename}/no-dynamic-require`]: "error"
952
953
  }
953
954
  }
955
+ },
956
+ {
957
+ files: ESLINT_CONFIG_GLOBS,
958
+ name: IMPORTS_CONFIG_NAME_RULES_WARNINGS_ESLINT_CONFIG,
959
+ rules: {
960
+ [`${importXPluginRename}/default`]: "off",
961
+ [`${importXPluginRename}/no-deprecated`]: "off",
962
+ [`${importXPluginRename}/no-named-as-default`]: "off",
963
+ [`${importXPluginRename}/no-named-as-default-member`]: "off"
964
+ }
954
965
  }
955
- /*
956
- * TODO: Decide if we want to keep these rules
957
- * {
958
- * files: ESLINT_CONFIG_GLOBS,
959
- * name: IMPORTS_CONFIG_NAME_RULES_WARNINGS_ESLINT_CONFIG,
960
- * rules: {
961
- * [`${importXPluginRename}/default`]: 'off',
962
- * [`${importXPluginRename}/no-deprecated`]: 'off',
963
- * [`${importXPluginRename}/no-named-as-default`]: 'off',
964
- * [`${importXPluginRename}/no-named-as-default-member`]: 'off',
965
- * },
966
- * }
967
- */
968
966
  );
969
967
  if (markdown2) {
970
968
  configs.push({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hexadrop/eslint-config",
3
- "version": "0.0.1-beta.0",
3
+ "version": "0.0.1-beta.1",
4
4
  "description": "Opinionated ESLint ruleset designed for large teams and projects",
5
5
  "keywords": [
6
6
  "lint",
@@ -74,7 +74,7 @@
74
74
  "devDependencies": {
75
75
  "@changesets/cli": "2.27.3",
76
76
  "@eslint/config-inspector": "0.4.8",
77
- "@hexadrop/tsconfig": "0.0.1",
77
+ "@hexadrop/tsconfig": "0.0.2",
78
78
  "@types/bun": "1.1.3",
79
79
  "@types/eslint": "8.56.10",
80
80
  "astro": "4.8.7",