@dg-scripts/eslint-config 0.0.0-1867

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 (4) hide show
  1. package/CHANGELOG.md +198 -0
  2. package/LICENSE +21 -0
  3. package/index.js +67 -0
  4. package/package.json +61 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,198 @@
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file.
4
+ See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
+
6
+ # [0.0.0-1867](https://github.com/sabertazimi/bod/compare/v5.17.0...v0.0.0-1867) (2024-03-31)
7
+
8
+ **Note:** Version bump only for package @dg-scripts/eslint-config
9
+
10
+ # [5.17.0](https://github.com/sabertazimi/bod/compare/v5.16.0...v5.17.0) (2024-03-30)
11
+
12
+ ### Bug Fixes
13
+
14
+ - **deps:** update dependency @antfu/eslint-config to ^2.11.6 ([#1139](https://github.com/sabertazimi/bod/issues/1139)) ([623eab5](https://github.com/sabertazimi/bod/commit/623eab59fb89b5e834a189889513a1ce0b0b96c8))
15
+ - **eslint-config:** project config for type-aware rules ([#1138](https://github.com/sabertazimi/bod/issues/1138)) ([b1ab580](https://github.com/sabertazimi/bod/commit/b1ab58095ae9ab65b9498060cca58ff58b1d1002))
16
+
17
+ ### Features
18
+
19
+ - **eslint-config:** config for non type-aware rules ([#1141](https://github.com/sabertazimi/bod/issues/1141)) ([6900b0d](https://github.com/sabertazimi/bod/commit/6900b0de861644c61dd4baf9758ca7740330ccb9))
20
+
21
+ # [5.16.0](https://github.com/sabertazimi/bod/compare/v5.15.2...v5.16.0) (2024-03-30)
22
+
23
+ ### Bug Fixes
24
+
25
+ - **eslint-config:** change brace-style to '1tbs' ([#1136](https://github.com/sabertazimi/bod/issues/1136)) ([06529a5](https://github.com/sabertazimi/bod/commit/06529a50b59bbeacb3bec4187a8ac240d8c39026))
26
+
27
+ ### Features
28
+
29
+ - **eslint-config:** add optional Next.js support ([#1135](https://github.com/sabertazimi/bod/issues/1135)) ([eeac1bc](https://github.com/sabertazimi/bod/commit/eeac1bcbca17d41e11664a5d8f2212c6778674b3))
30
+
31
+ ## [5.15.2](https://github.com/sabertazimi/bod/compare/v5.15.1...v5.15.2) (2024-03-30)
32
+
33
+ **Note:** Version bump only for package @dg-scripts/eslint-config
34
+
35
+ ## [5.15.1](https://github.com/sabertazimi/bod/compare/v5.15.0...v5.15.1) (2024-03-30)
36
+
37
+ **Note:** Version bump only for package @dg-scripts/eslint-config
38
+
39
+ # [5.15.0](https://github.com/sabertazimi/bod/compare/v5.14.3...v5.15.0) (2024-03-30)
40
+
41
+ ### Features
42
+
43
+ - **eslint-config:** ship to flat configuration ([#1133](https://github.com/sabertazimi/bod/issues/1133)) ([3e33201](https://github.com/sabertazimi/bod/commit/3e332013a0f8a7f6d55f068451db0116ec3e62d8))
44
+
45
+ ## [5.14.3](https://github.com/sabertazimi/bod/compare/v5.14.2...v5.14.3) (2024-03-05)
46
+
47
+ **Note:** Version bump only for package @dg-scripts/eslint-config
48
+
49
+ ## [5.14.2](https://github.com/sabertazimi/bod/compare/v5.14.1...v5.14.2) (2024-01-20)
50
+
51
+ ### Bug Fixes
52
+
53
+ - **deps:** update dependencies (non-major) ([#1075](https://github.com/sabertazimi/bod/issues/1075)) ([e75f127](https://github.com/sabertazimi/bod/commit/e75f1273347faf9831d84b3fc41db0484c549b6c))
54
+
55
+ ## [5.14.1](https://github.com/sabertazimi/bod/compare/v5.14.0...v5.14.1) (2023-12-26)
56
+
57
+ ### Bug Fixes
58
+
59
+ - **deps:** update dependencies (non-major) ([#1001](https://github.com/sabertazimi/bod/issues/1001)) ([046d35b](https://github.com/sabertazimi/bod/commit/046d35b5d4c15f59e9211107003ebf8fdc11516a))
60
+ - **deps:** update dependencies (non-major) ([#1045](https://github.com/sabertazimi/bod/issues/1045)) ([e89dc14](https://github.com/sabertazimi/bod/commit/e89dc14dcedd5bdb880b701a2635516817bcc6a8))
61
+ - **deps:** update dependencies (non-major) ([#1072](https://github.com/sabertazimi/bod/issues/1072)) ([3373cc7](https://github.com/sabertazimi/bod/commit/3373cc72c66f2297013b1b1db6822ac520113f65))
62
+ - **deps:** update dependency eslint-config-prettier to ^9.1.0 ([#1064](https://github.com/sabertazimi/bod/issues/1064)) ([eaa66fb](https://github.com/sabertazimi/bod/commit/eaa66fb653060386ad950f075654298da08ea09f))
63
+ - **deps:** update dependency eslint-config-prettier to v9 ([#1016](https://github.com/sabertazimi/bod/issues/1016)) ([2e7d863](https://github.com/sabertazimi/bod/commit/2e7d8635a240f9e54e7e3c11fa9df07d7f94fab1))
64
+
65
+ # [5.14.0](https://github.com/sabertazimi/bod/compare/v5.13.5...v5.14.0) (2023-07-08)
66
+
67
+ ### Bug Fixes
68
+
69
+ - **deps:** update dependencies (non-major) ([#933](https://github.com/sabertazimi/bod/issues/933)) ([fa21516](https://github.com/sabertazimi/bod/commit/fa215162aa96d79a135cd561730121cff171f5e5))
70
+
71
+ ### Features
72
+
73
+ - **deps:** update prettier to v3 ([#997](https://github.com/sabertazimi/bod/issues/997)) ([93ee6fd](https://github.com/sabertazimi/bod/commit/93ee6fdc784acfb989570c1c9e13ab8a1dd9d1bd))
74
+
75
+ ## [5.13.5](https://github.com/sabertazimi/bod/compare/v5.13.4...v5.13.5) (2023-03-21)
76
+
77
+ **Note:** Version bump only for package @dg-scripts/eslint-config
78
+
79
+ ## [5.13.4](https://github.com/sabertazimi/bod/compare/v5.13.3...v5.13.4) (2023-03-08)
80
+
81
+ **Note:** Version bump only for package @dg-scripts/eslint-config
82
+
83
+ ## [5.13.3](https://github.com/sabertazimi/bod/compare/v5.13.2...v5.13.3) (2023-02-19)
84
+
85
+ **Note:** Version bump only for package @dg-scripts/eslint-config
86
+
87
+ ## [5.13.2](https://github.com/sabertazimi/bod/compare/v5.13.1...v5.13.2) (2023-02-14)
88
+
89
+ **Note:** Version bump only for package @dg-scripts/eslint-config
90
+
91
+ ## [5.13.1](https://github.com/sabertazimi/bod/compare/v5.13.0...v5.13.1) (2023-02-12)
92
+
93
+ **Note:** Version bump only for package @dg-scripts/eslint-config
94
+
95
+ # [5.13.0](https://github.com/sabertazimi/bod/compare/v5.12.0...v5.13.0) (2023-02-12)
96
+
97
+ **Note:** Version bump only for package @dg-scripts/eslint-config
98
+
99
+ # [5.12.0](https://github.com/sabertazimi/bod/compare/v5.11.1...v5.12.0) (2023-02-12)
100
+
101
+ **Note:** Version bump only for package @dg-scripts/eslint-config
102
+
103
+ ## [5.11.1](https://github.com/sabertazimi/bod/compare/v5.11.0...v5.11.1) (2023-02-12)
104
+
105
+ ### Bug Fixes
106
+
107
+ - **deps:** update dependencies (non-major) ([#769](https://github.com/sabertazimi/bod/issues/769)) ([3ce05f2](https://github.com/sabertazimi/bod/commit/3ce05f2758cc4b76bdbeb98c5d4d26f9eaffe0a3))
108
+ - **deps:** update dependencies (non-major) ([#875](https://github.com/sabertazimi/bod/issues/875)) ([16d843c](https://github.com/sabertazimi/bod/commit/16d843c97062c25e39e76efe5df20cae8c8aeac9))
109
+
110
+ # [5.11.0](https://github.com/sabertazimi/bod/compare/v5.10.0...v5.11.0) (2022-06-20)
111
+
112
+ ### Bug Fixes
113
+
114
+ - **eslint-config:** improve `package.json` sorting ([#758](https://github.com/sabertazimi/bod/issues/758)) ([dd47adc](https://github.com/sabertazimi/bod/commit/dd47adcc7f78a56956421669bb383e9aa0858232))
115
+
116
+ # [5.10.0](https://github.com/sabertazimi/bod/compare/v5.9.0...v5.10.0) (2022-04-30)
117
+
118
+ **Note:** Version bump only for package @dg-scripts/eslint-config
119
+
120
+ # [5.9.0](https://github.com/sabertazimi/bod/compare/v5.8.1...v5.9.0) (2022-04-19)
121
+
122
+ **Note:** Version bump only for package @dg-scripts/eslint-config
123
+
124
+ ## [5.8.1](https://github.com/sabertazimi/bod/compare/v5.8.0...v5.8.1) (2022-04-03)
125
+
126
+ **Note:** Version bump only for package @dg-scripts/eslint-config
127
+
128
+ # [5.8.0](https://github.com/sabertazimi/bod/compare/v5.7.0...v5.8.0) (2022-03-20)
129
+
130
+ **Note:** Version bump only for package @dg-scripts/eslint-config
131
+
132
+ # [5.7.0](https://github.com/sabertazimi/bod/compare/v5.6.2...v5.7.0) (2022-03-19)
133
+
134
+ ### Bug Fixes
135
+
136
+ - **deps:** update dependency eslint-config-prettier to ^8.4.0 ([#599](https://github.com/sabertazimi/bod/issues/599)) ([8defa83](https://github.com/sabertazimi/bod/commit/8defa83023710d1fcbda911175456c09be448c92))
137
+ - **deps:** update dependency eslint-config-prettier to ^8.5.0 ([#630](https://github.com/sabertazimi/bod/issues/630)) ([ad65e30](https://github.com/sabertazimi/bod/commit/ad65e309b874fca0011db65ff5e5b8303f26b178))
138
+ - **eslint-config:** improve rules configuration ([#660](https://github.com/sabertazimi/bod/issues/660)) ([bbdb0c0](https://github.com/sabertazimi/bod/commit/bbdb0c02e4aab8c6ef3206f18d96e29503b28032))
139
+
140
+ ## [5.6.2](https://github.com/sabertazimi/bod/compare/v5.6.1...v5.6.2) (2022-01-17)
141
+
142
+ **Note:** Version bump only for package @dg-scripts/eslint-config
143
+
144
+ ## [5.6.1](https://github.com/sabertazimi/bod/compare/v5.6.0...v5.6.1) (2021-12-26)
145
+
146
+ **Note:** Version bump only for package @dg-scripts/eslint-config
147
+
148
+ # [5.6.0](https://github.com/sabertazimi/bod/compare/v5.5.10...v5.6.0) (2021-12-13)
149
+
150
+ **Note:** Version bump only for package @dg-scripts/eslint-config
151
+
152
+ ## [5.5.10](https://github.com/sabertazimi/bod/compare/v5.5.9...v5.5.10) (2021-11-11)
153
+
154
+ **Note:** Version bump only for package @dg-scripts/eslint-config
155
+
156
+ ## [5.5.9](https://github.com/sabertazimi/bod/compare/v5.5.8...v5.5.9) (2021-10-30)
157
+
158
+ **Note:** Version bump only for package @dg-scripts/eslint-config
159
+
160
+ ## [5.5.8](https://github.com/sabertazimi/bod/compare/v5.5.7...v5.5.8) (2021-10-27)
161
+
162
+ **Note:** Version bump only for package @dg-scripts/eslint-config
163
+
164
+ ## [5.5.7](https://github.com/sabertazimi/bod/compare/v5.5.6...v5.5.7) (2021-10-23)
165
+
166
+ **Note:** Version bump only for package @dg-scripts/eslint-config
167
+
168
+ ## [5.5.6](https://github.com/sabertazimi/bod/compare/v5.5.5...v5.5.6) (2021-10-23)
169
+
170
+ **Note:** Version bump only for package @dg-scripts/eslint-config
171
+
172
+ ## [5.5.5](https://github.com/sabertazimi/bod/compare/v5.5.4...v5.5.5) (2021-10-23)
173
+
174
+ **Note:** Version bump only for package @dg-scripts/eslint-config
175
+
176
+ ## [5.5.4](https://github.com/sabertazimi/bod/compare/v5.5.3...v5.5.4) (2021-10-17)
177
+
178
+ **Note:** Version bump only for package @dg-scripts/eslint-config
179
+
180
+ ## [5.5.3](https://github.com/sabertazimi/bod/compare/v5.5.2...v5.5.3) (2021-10-16)
181
+
182
+ ### Bug Fixes
183
+
184
+ - **deps:** update dependency eslint to v8 ([#242](https://github.com/sabertazimi/bod/issues/242)) ([f8e0034](https://github.com/sabertazimi/bod/commit/f8e0034b58221a7afa385c11214814882769e513))
185
+
186
+ ## [5.5.2](https://github.com/sabertazimi/bod/compare/v5.5.1...v5.5.2) (2021-10-14)
187
+
188
+ **Note:** Version bump only for package @dg-scripts/eslint-config
189
+
190
+ ## [5.5.1](https://github.com/sabertazimi/bod/compare/v5.5.0...v5.5.1) (2021-10-12)
191
+
192
+ **Note:** Version bump only for package @dg-scripts/eslint-config
193
+
194
+ # [5.5.0](https://github.com/sabertazimi/bod/compare/v5.4.1...v5.5.0) (2021-10-12)
195
+
196
+ ### Features
197
+
198
+ - **linter:** add `dg-scripts` eslint and stylelint configuration ([2cb283f](https://github.com/sabertazimi/bod/commit/2cb283f8f96fd2381459b284c8d9afccd4b8fd66))
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2018-present, Sabertaz
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/index.js ADDED
@@ -0,0 +1,67 @@
1
+ import path from 'node:path'
2
+ import { fileURLToPath } from 'node:url'
3
+ import { isPackageExists } from 'local-pkg'
4
+ import antfu from '@antfu/eslint-config'
5
+ import { FlatCompat } from '@eslint/eslintrc'
6
+
7
+ const baseDirectory = path.dirname(fileURLToPath(import.meta.url))
8
+
9
+ const compat = new FlatCompat({
10
+ baseDirectory,
11
+ resolvePluginsRelativeTo: baseDirectory,
12
+ })
13
+
14
+ const eslintConfigNext = isPackageExists('next') && isPackageExists('eslint-config-next')
15
+ ? compat.config({
16
+ overrides: [
17
+ {
18
+ files: '**/*.{ts,tsx}',
19
+ extends: 'next/core-web-vitals',
20
+ },
21
+ ],
22
+ })
23
+ : {}
24
+
25
+ /** @type {import('@antfu/eslint-config').OptionsConfig} */
26
+ const eslintConfigAntfu = {
27
+ react: true,
28
+ formatters: {
29
+ css: true,
30
+ html: true,
31
+ markdown: 'prettier',
32
+ },
33
+ }
34
+
35
+ /** @type {import('@antfu/eslint-config').TypedFlatConfigItem} */
36
+ const eslintConfigRules = {
37
+ rules: {
38
+ 'style/brace-style': ['error', '1tbs'],
39
+ 'ts/prefer-literal-enum-member': [
40
+ 'error',
41
+ {
42
+ allowBitwiseExpressions: true,
43
+ },
44
+ ],
45
+ },
46
+ }
47
+
48
+ /** @type {import('@antfu/eslint-config').TypedFlatConfigItem[]} */
49
+ const eslintConfig = [
50
+ eslintConfigNext,
51
+ eslintConfigRules,
52
+ ]
53
+
54
+ export default antfu(
55
+ {
56
+ typescript: {
57
+ tsconfigPath: ['tsconfig.json', 'packages/*/tsconfig.json'],
58
+ },
59
+ ...eslintConfigAntfu,
60
+ },
61
+ ...eslintConfig,
62
+ )
63
+
64
+ export const disableTypeAware = antfu(
65
+ eslintConfigAntfu,
66
+ ...eslintConfig,
67
+ )
package/package.json ADDED
@@ -0,0 +1,61 @@
1
+ {
2
+ "name": "@dg-scripts/eslint-config",
3
+ "type": "module",
4
+ "version": "0.0.0-1867",
5
+ "description": "ESLint configuration used by dg-scripts.",
6
+ "author": "sabertazimi <sabertazimi@gmail.com>",
7
+ "license": "MIT",
8
+ "homepage": "https://github.com/sabertazimi/bod",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/sabertazimi/bod.git",
12
+ "directory": "packages/eslint-config"
13
+ },
14
+ "bugs": {
15
+ "url": "https://github.com/sabertazimi/bod/issues"
16
+ },
17
+ "keywords": [
18
+ "dg-scripts",
19
+ "lint",
20
+ "linter",
21
+ "prettier",
22
+ "standard",
23
+ "eslint",
24
+ "eslint-prettier"
25
+ ],
26
+ "main": "index.js",
27
+ "publishConfig": {
28
+ "access": "public"
29
+ },
30
+ "engines": {
31
+ "node": ">=18.0.0"
32
+ },
33
+ "scripts": {
34
+ "lint": "eslint . --config=index.js"
35
+ },
36
+ "peerDependencies": {
37
+ "eslint": "^8.0.0",
38
+ "eslint-config-next": "^14.0.0",
39
+ "next": "^14.0.0",
40
+ "prettier": "^3.0.0",
41
+ "typescript": "^5.0.0"
42
+ },
43
+ "peerDependenciesMeta": {
44
+ "eslint-config-next": {
45
+ "optional": true
46
+ },
47
+ "next": {
48
+ "optional": true
49
+ }
50
+ },
51
+ "dependencies": {
52
+ "@antfu/eslint-config": "^2.11.6",
53
+ "@eslint/eslintrc": "^3.0.2",
54
+ "eslint-plugin-format": "^0.1.0",
55
+ "eslint-plugin-react": "^7.34.1",
56
+ "eslint-plugin-react-hooks": "^4.6.0",
57
+ "eslint-plugin-react-refresh": "^0.4.6",
58
+ "local-pkg": "^0.5.0"
59
+ },
60
+ "gitHead": "27b404c9bab635676f0939f84764ddc292fa681d"
61
+ }