@santi020k/eslint-config-basic 0.1.0 → 0.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.
Files changed (142) hide show
  1. package/README.md +2 -272
  2. package/dist/index.d.ts +21 -0
  3. package/dist/index.js +127 -0
  4. package/package.json +47 -50
  5. package/.agent/rules/context.md +0 -78
  6. package/.agent/rules/guidelines.md +0 -124
  7. package/.editorconfig +0 -13
  8. package/.env.example +0 -8
  9. package/.github/CODEOWNERS +0 -2
  10. package/.github/DISCUSSION_TEMPLATE/rfcs.yml +0 -21
  11. package/.github/DISCUSSION_TEMPLATE/technical-discussions.yml +0 -21
  12. package/.github/FUNDING.yml +0 -2
  13. package/.github/ISSUE_TEMPLATE/README.md +0 -13
  14. package/.github/ISSUE_TEMPLATE/bug_report.yml +0 -69
  15. package/.github/ISSUE_TEMPLATE/config.yml +0 -8
  16. package/.github/ISSUE_TEMPLATE/feature_request.yml +0 -43
  17. package/.github/ISSUE_TEMPLATE/question.yml +0 -22
  18. package/.github/SECURITY.md +0 -12
  19. package/.github/SPONSORSHIPS.md +0 -27
  20. package/.github/dependabot.yml +0 -45
  21. package/.github/labeler.yml +0 -46
  22. package/.github/pull_request_template.md +0 -56
  23. package/.github/workflows/assign-issues.yml +0 -18
  24. package/.github/workflows/audit.yml +0 -22
  25. package/.github/workflows/build.yml +0 -29
  26. package/.github/workflows/codeql.yml +0 -40
  27. package/.github/workflows/docs.yml +0 -49
  28. package/.github/workflows/labeler.yml +0 -18
  29. package/.github/workflows/publish.yml +0 -24
  30. package/.github/workflows/release.yml +0 -35
  31. package/.github/workflows/size-check.yml +0 -23
  32. package/.github/workflows/stale.yml +0 -31
  33. package/.nvmrc +0 -1
  34. package/.vscode/extensions.json +0 -10
  35. package/.vscode/settings.json +0 -55
  36. package/CHANGELOG.md +0 -16
  37. package/CONTRIBUTING.md +0 -194
  38. package/DEVELOPMENT.md +0 -4
  39. package/LICENSE +0 -21
  40. package/config/.husky/commit-msg +0 -9
  41. package/config/.husky/pre-commit +0 -1
  42. package/config/.husky/pre-push +0 -1
  43. package/config/.husky/prepare-commit-msg +0 -1
  44. package/cspell.config.yaml +0 -2
  45. package/eslint.config.js +0 -21
  46. package/llms.txt +0 -72
  47. package/packages/astro/README.md +0 -13
  48. package/packages/astro/package.json +0 -45
  49. package/packages/astro/src/ambient.d.ts +0 -10
  50. package/packages/astro/src/index.ts +0 -18
  51. package/packages/astro/src/rules.ts +0 -29
  52. package/packages/astro/tsconfig.json +0 -9
  53. package/packages/astro/tsup.config.ts +0 -11
  54. package/packages/basic/README.md +0 -33
  55. package/packages/basic/package.json +0 -55
  56. package/packages/basic/src/index.ts +0 -110
  57. package/packages/basic/tsconfig.json +0 -9
  58. package/packages/basic/tsup.config.ts +0 -18
  59. package/packages/core/README.md +0 -14
  60. package/packages/core/index.ts +0 -14
  61. package/packages/core/package.json +0 -61
  62. package/packages/core/src/ambient.d.ts +0 -61
  63. package/packages/core/src/index.ts +0 -75
  64. package/packages/core/src/rules.ts +0 -157
  65. package/packages/core/src/settings/gitignore.ts +0 -10
  66. package/packages/core/src/settings/index.ts +0 -1
  67. package/packages/core/src/types.ts +0 -57
  68. package/packages/core/src/utils/index.ts +0 -28
  69. package/packages/core/tsconfig.json +0 -9
  70. package/packages/core/tsup.config.ts +0 -10
  71. package/packages/expo/README.md +0 -13
  72. package/packages/expo/package.json +0 -48
  73. package/packages/expo/src/ambient.d.ts +0 -3
  74. package/packages/expo/src/index.ts +0 -39
  75. package/packages/expo/tsconfig.json +0 -9
  76. package/packages/expo/tsup.config.ts +0 -11
  77. package/packages/nest/package.json +0 -45
  78. package/packages/nest/src/ambient.d.ts +0 -14
  79. package/packages/nest/src/index.ts +0 -20
  80. package/packages/nest/src/rules.ts +0 -15
  81. package/packages/nest/tsconfig.json +0 -9
  82. package/packages/nest/tsup.config.ts +0 -11
  83. package/packages/next/README.md +0 -13
  84. package/packages/next/package.json +0 -47
  85. package/packages/next/src/index.ts +0 -31
  86. package/packages/next/src/rules.ts +0 -16
  87. package/packages/next/tsconfig.json +0 -9
  88. package/packages/next/tsup.config.ts +0 -10
  89. package/packages/optionals/README.md +0 -18
  90. package/packages/optionals/package.json +0 -55
  91. package/packages/optionals/src/ambient.d.ts +0 -25
  92. package/packages/optionals/src/cspell.ts +0 -14
  93. package/packages/optionals/src/i18next.ts +0 -19
  94. package/packages/optionals/src/index.ts +0 -8
  95. package/packages/optionals/src/markdown.ts +0 -66
  96. package/packages/optionals/src/mdx.ts +0 -40
  97. package/packages/optionals/src/stencil.ts +0 -48
  98. package/packages/optionals/src/tailwind.ts +0 -11
  99. package/packages/optionals/src/vitest.ts +0 -61
  100. package/packages/optionals/tsconfig.json +0 -9
  101. package/packages/optionals/tsup.config.ts +0 -11
  102. package/packages/playground/README.md +0 -14
  103. package/packages/playground/package.json +0 -17
  104. package/packages/playground/src/astro/eslint.config.js +0 -4
  105. package/packages/playground/src/js/eslint.config.js +0 -4
  106. package/packages/playground/src/js/index.test.js +0 -63
  107. package/packages/playground/src/mdx/eslint.config.js +0 -4
  108. package/packages/playground/src/mdx/index.mdx +0 -115
  109. package/packages/playground/src/react/eslint.config.js +0 -4
  110. package/packages/playground/src/react/index.test.jsx +0 -130
  111. package/packages/playground/src/ts/eslint.config.js +0 -4
  112. package/packages/playground/src/ts/index.test.ts +0 -61
  113. package/packages/playground/src/ts/tsconfig.json +0 -3
  114. package/packages/playground/tsconfig.json +0 -9
  115. package/packages/react/README.md +0 -14
  116. package/packages/react/index.ts +0 -26
  117. package/packages/react/package.json +0 -49
  118. package/packages/react/src/ambient.d.ts +0 -23
  119. package/packages/react/src/index.ts +0 -52
  120. package/packages/react/src/rules.ts +0 -47
  121. package/packages/react/tsconfig.json +0 -9
  122. package/packages/react/tsup.config.ts +0 -10
  123. package/packages/tests/README.md +0 -17
  124. package/packages/tests/package.json +0 -21
  125. package/packages/tests/src/__snapshots__/snapshots.test.ts.snap +0 -654
  126. package/packages/tests/src/composition.test.ts +0 -171
  127. package/packages/tests/src/configs.test.ts +0 -118
  128. package/packages/tests/src/rules.test.ts +0 -60
  129. package/packages/tests/src/snapshots.test.ts +0 -126
  130. package/packages/tests/tsconfig.json +0 -10
  131. package/packages/tests/vitest.config.ts +0 -8
  132. package/packages/typescript/README.md +0 -14
  133. package/packages/typescript/package.json +0 -47
  134. package/packages/typescript/src/index.ts +0 -32
  135. package/packages/typescript/src/rules.ts +0 -36
  136. package/packages/typescript/tsconfig.json +0 -9
  137. package/packages/typescript/tsup.config.ts +0 -10
  138. package/tsconfig.base.json +0 -20
  139. package/tsconfig.docs.json +0 -18
  140. package/turbo.json +0 -19
  141. package/typedoc.config.mjs +0 -25
  142. package/typedoc.markdown.mjs +0 -26
@@ -1,157 +0,0 @@
1
- import type { TSESLint } from '@typescript-eslint/utils'
2
-
3
- const groups = [
4
- // Internal packages.
5
- // Atomic Design and components
6
- ['^(components|@/components|@components)(/.*|$)'],
7
- ['^(ui|@/ui|@ui)(/.*|$)'],
8
- ['^(atoms|@/atoms|@atoms)(/.*|$)'],
9
- ['^(molecules|@/molecules|@molecules)(/.*|$)'],
10
- ['^(organisms|@/organisms|@organisms)(/.*|$)'],
11
- ['^(templates|@/templates|@templates)(/.*|$)'],
12
- ['^(pages|@/pages|@pages)(/.*|$)'],
13
- // Other posible folders
14
- ['^(store|@/store|@store)(/.*|$)'],
15
- ['^(api|@/api|@api)(/.*|$)'],
16
- ['^(contexts|@/contexts|@contexts)(/.*|$)'],
17
- ['^(hooks|@/hooks|@hooks)(/.*|$)'],
18
- ['^(lib|@/lib|@lib)(/.*|$)'],
19
- ['^(services|@/services|@services)(/.*|$)'],
20
- ['^(models|@/models|@models)(/.*|$)'],
21
- ['^(utils|@/utils|@utils)(/.*|$)'],
22
- ['^(ws|@/ws|@ws)(/.*|$)'],
23
- // npm packages
24
- ['^\\w'],
25
- // Side effect imports.
26
- ['^\\u0000'],
27
- // Other relative imports. Put same-folder imports and `.` last.
28
- ['^\\./(?=.*/)(?!/?$)', '^\\.(?!/?$)', '^\\./?$'],
29
- // Parent imports. Put `..` last.
30
- ['^\\.\\.(?!/?$)', '^\\.\\./?$'],
31
- // Style imports.
32
- ['^.+\\.?(css|scss)$']
33
- ]
34
-
35
- export const rules: TSESLint.Linter.RulesRecord = {
36
- 'unused-imports/no-unused-imports': 'warn',
37
- indent: 'off',
38
- 'brace-style': 'off',
39
- '@stylistic/brace-style': ['warn', '1tbs'],
40
- '@stylistic/indent': ['warn', 2],
41
- '@stylistic/quote-props': ['warn', 'as-needed'],
42
- quotes: 'off',
43
- '@stylistic/quotes': ['warn', 'single'],
44
- '@stylistic/semi': ['warn', 'never'],
45
- 'quote-props': 'off',
46
- 'comma-dangle': 'off',
47
- '@stylistic/comma-dangle': ['warn', 'never'],
48
- '@stylistic/object-curly-spacing': ['warn', 'always'],
49
- '@stylistic/padded-blocks': ['warn', 'never'],
50
- '@stylistic/arrow-parens': ['warn', 'as-needed'],
51
- '@stylistic/dot-location': ['warn', 'property'],
52
- '@stylistic/function-call-argument-newline': ['warn', 'never'],
53
- '@stylistic/object-property-newline': [
54
- 'warn',
55
- { allowAllPropertiesOnSameLine: true }
56
- ],
57
- '@stylistic/multiline-ternary': ['warn', 'always-multiline'],
58
- '@stylistic/member-delimiter-style': ['error', {
59
- multiline: {
60
- delimiter: 'none',
61
- requireLast: false
62
- },
63
- singleline: {
64
- delimiter: 'comma',
65
- requireLast: false
66
- },
67
- overrides: {
68
- interface: {
69
- multiline: {
70
- delimiter: 'none',
71
- requireLast: false
72
- }
73
- }
74
- }
75
- }],
76
- '@stylistic/no-extra-parens': 'off',
77
- '@stylistic/max-len': [
78
- 'warn',
79
- {
80
- code: 120,
81
- tabWidth: 2,
82
- comments: 200,
83
- ignoreStrings: true
84
- }
85
- ],
86
- '@stylistic/max-statements-per-line': ['warn', { max: 1 }],
87
- '@stylistic/array-element-newline': ['warn', 'consistent'],
88
- '@stylistic/no-extra-semi': 'off',
89
- '@stylistic/no-multi-spaces': 'off',
90
- '@stylistic/padding-line-between-statements': [
91
- 'warn',
92
- { blankLine: 'always', prev: '*', next: '*' },
93
- { blankLine: 'any', prev: 'import', next: 'import' },
94
- {
95
- blankLine: 'always',
96
- prev: ['const', 'let', 'var'],
97
- next: ['const', 'let', 'var']
98
- },
99
- {
100
- blankLine: 'never',
101
- prev: ['singleline-const', 'singleline-let', 'singleline-var'],
102
- next: ['singleline-const', 'singleline-let', 'singleline-var']
103
- },
104
- { blankLine: 'always', prev: 'block-like', next: 'const' },
105
- { blankLine: 'always', prev: 'const', next: 'block-like' }
106
- ],
107
- '@stylistic/function-paren-newline': ['warn', 'consistent'],
108
- 'arrow-body-style': ['warn', 'as-needed'],
109
- 'prefer-arrow-callback': ['warn', { allowNamedFunctions: true }],
110
- 'func-style': ['warn', 'expression', { allowArrowFunctions: true }],
111
- 'simple-import-sort/imports': [
112
- 'warn',
113
- {
114
- groups
115
- }
116
- ],
117
- 'jsx-a11y/alt-text': 'warn',
118
- 'no-empty': 'warn',
119
- 'no-nested-ternary': 'warn',
120
- 'no-undef': 'warn',
121
- 'unused-imports/no-unused-vars': [
122
- 'warn',
123
- {
124
- vars: 'all',
125
- varsIgnorePattern: '^_',
126
- args: 'after-used',
127
- argsIgnorePattern: '^_',
128
- destructuredArrayIgnorePattern: '^_',
129
- ignoreRestSiblings: true
130
- }
131
- ],
132
- 'no-void': 'warn',
133
- camelcase: 'warn',
134
- 'array-callback-return': 'warn',
135
- 'no-fallthrough': 'warn',
136
- eqeqeq: 'warn',
137
- 'no-constant-binary-expression': 'warn',
138
- '@stylistic/lines-around-comment': ['error', { allowClassStart: true, beforeLineComment: false, allowBlockStart: true }],
139
- 'import/no-duplicates': 'warn',
140
- 'valid-typeof': 'warn',
141
- 'no-constant-condition': 'warn',
142
- 'no-use-before-define': 'warn',
143
- '@stylistic/implicit-arrow-linebreak': 'warn',
144
- 'import/export': 'warn',
145
- 'no-useless-escape': 'warn',
146
- 'no-useless-return': 'warn',
147
- 'prefer-promise-reject-errors': 'warn',
148
- 'no-useless-constructor': 'warn',
149
- 'no-new': 'warn',
150
- 'prefer-regex-literals': 'warn',
151
- '@stylistic/multiline-comment-style': 'off',
152
- 'space-before-function-paren': 'off',
153
- 'operator-linebreak': 'off',
154
- '@stylistic/operator-linebreak': ['error', 'after']
155
- }
156
-
157
- export { groups }
@@ -1,10 +0,0 @@
1
- import { includeIgnoreFile } from '@eslint/compat'
2
- import type { TSESLint } from '@typescript-eslint/utils'
3
-
4
- /**
5
- * Gitignore ESLint configuration
6
- * Automatically ignores files from .gitignore
7
- */
8
- export const gitignore: TSESLint.FlatConfig.ConfigArray = [
9
- includeIgnoreFile(`${process.cwd()}/.gitignore`) as TSESLint.FlatConfig.Config
10
- ]
@@ -1 +0,0 @@
1
- export { gitignore } from './gitignore.js'
@@ -1,57 +0,0 @@
1
- import type { TSESLint } from '@typescript-eslint/utils'
2
-
3
- /**
4
- * Enum for configuration options in ESLint
5
- */
6
- export enum ConfigOption {
7
- Ts = 'ts',
8
- React = 'react',
9
- Next = 'next',
10
- Expo = 'expo',
11
- Astro = 'astro',
12
- Nest = 'nest'
13
- }
14
-
15
- /**
16
- * Enum for optional features that can be included in ESLint
17
- */
18
- export enum OptionalOption {
19
- Cspell = 'cspell',
20
- Tailwind = 'tailwind',
21
- Vitest = 'vitest',
22
- I18next = 'i18next',
23
- Mdx = 'mdx',
24
- Markdown = 'markdown',
25
- Stencil = 'stencil'
26
- }
27
-
28
- /**
29
- * Enum for settings options in ESLint
30
- */
31
- export enum SettingOption {
32
- Gitignore = 'gitignore'
33
- }
34
-
35
- /**
36
- * Array of configurations that require React
37
- */
38
- export const ReactConfigs: ConfigOption[] = [
39
- ConfigOption.React,
40
- ConfigOption.Astro,
41
- ConfigOption.Next,
42
- ConfigOption.Expo
43
- ]
44
-
45
- /**
46
- * ESLint configuration interface
47
- */
48
- export interface EslintConfigOptions {
49
- config?: ConfigOption[]
50
- optionals?: OptionalOption[]
51
- settings?: SettingOption[]
52
- }
53
-
54
- /**
55
- * Type alias for ESLint flat config array
56
- */
57
- export type FlatConfigArray = TSESLint.FlatConfig.ConfigArray
@@ -1,28 +0,0 @@
1
- import type { FlatConfigArray } from '../types.js'
2
- import { ConfigOption, ReactConfigs } from '../types.js'
3
-
4
- /**
5
- * Adds a specific configuration if the given option is present in the configs array.
6
- *
7
- * @param configs - An array of configuration options.
8
- * @param option - The option to check for.
9
- * @param configToAdd - The configuration to add if the option is present.
10
- * @returns The configuration to add if the option is present, otherwise an empty array.
11
- */
12
- export const applyConfigIfOptionPresent = (
13
- configs: ConfigOption[],
14
- option: ConfigOption,
15
- configToAdd: FlatConfigArray
16
- ): FlatConfigArray => configs.includes(option) ? configToAdd : []
17
-
18
- /**
19
- * Checks if the provided configs array includes any React-specific configurations.
20
- *
21
- * @param configs - An optional array of configuration options.
22
- * @returns True if any React configuration is found, false otherwise.
23
- */
24
- export const hasReactConfig = (configs?: ConfigOption[]): boolean => {
25
- if (!configs) return false
26
-
27
- return ReactConfigs.some(reactConfig => configs.includes(reactConfig))
28
- }
@@ -1,9 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.base.json",
3
- "compilerOptions": {
4
- "outDir": "./dist",
5
- "rootDir": "./src"
6
- },
7
- "include": ["src/**/*.ts"],
8
- "exclude": ["node_modules", "dist"]
9
- }
@@ -1,10 +0,0 @@
1
- import { defineConfig } from 'tsup'
2
-
3
- export default defineConfig({
4
- entry: ['src/index.ts', 'src/types.ts', 'src/utils/index.ts'],
5
- format: ['esm'],
6
- dts: true,
7
- clean: true,
8
- splitting: false,
9
- sourcemap: true
10
- })
@@ -1,13 +0,0 @@
1
- # @santi020k/eslint-config-expo
2
-
3
- Expo and React Native specific ESLint rules and configurations.
4
-
5
- ## Description
6
-
7
- This package provides:
8
- - Expo plugin configuration.
9
- - React Native specific rules.
10
-
11
- ## Usage
12
-
13
- This package is used automatically when `ConfigOption.Expo` is selected in the main configuration.
@@ -1,48 +0,0 @@
1
- {
2
- "name": "@santi020k/eslint-config-expo",
3
- "version": "0.0.0",
4
- "description": "Expo ESLint configuration",
5
- "type": "module",
6
- "main": "./dist/index.js",
7
- "module": "./dist/index.js",
8
- "types": "./dist/index.d.ts",
9
- "exports": {
10
- ".": {
11
- "import": "./dist/index.js",
12
- "types": "./dist/index.d.ts"
13
- }
14
- },
15
- "files": [
16
- "dist"
17
- ],
18
- "scripts": {
19
- "build": "tsup",
20
- "dev": "tsup --watch",
21
- "clean": "rm -rf dist"
22
- },
23
- "peerDependencies": {
24
- "eslint": "^9.0.0"
25
- },
26
- "dependencies": {
27
- "@santi020k/eslint-config-core": "*",
28
- "@eslint/compat": "^1.2.9",
29
- "@eslint/eslintrc": "^3.3.1",
30
- "cross-dirname": "^0.1.0",
31
- "eslint-config-expo": "^9.2.0"
32
- },
33
- "devDependencies": {
34
- "@typescript-eslint/utils": "^8.54.0",
35
- "tsup": "^8.5.1",
36
- "typescript": "^5.9.3"
37
- },
38
- "publishConfig": {
39
- "access": "public"
40
- },
41
- "license": "MIT",
42
- "author": "santi020k",
43
- "repository": {
44
- "type": "git",
45
- "url": "git+https://github.com/santi020k/eslint-config.git",
46
- "directory": "packages/expo"
47
- }
48
- }
@@ -1,3 +0,0 @@
1
- declare module 'cross-dirname' {
2
- export function getDirname(): string
3
- }
@@ -1,39 +0,0 @@
1
- import { getDirname } from 'cross-dirname'
2
-
3
- import { FlatCompat } from '@eslint/eslintrc'
4
- import { fixupConfigRules } from '@eslint/compat'
5
- import type { TSESLint } from '@typescript-eslint/utils'
6
-
7
- import { groups } from '@santi020k/eslint-config-core'
8
-
9
- // Initialize FlatCompat with the base directory
10
- const flatCompat = new FlatCompat({
11
- baseDirectory: getDirname(),
12
- recommendedConfig: {}
13
- })
14
-
15
- const rules: TSESLint.Linter.RulesRecord = {
16
- 'simple-import-sort/imports': [
17
- 'warn',
18
- {
19
- groups: [
20
- // Packages `react` related packages come first.
21
- ['^react'],
22
- ['^(expo)(/.*|$)?'],
23
- ...groups
24
- ]
25
- }
26
- ]
27
- }
28
-
29
- /**
30
- * Expo ESLint configuration
31
- * Extends the expo config with custom import sorting
32
- */
33
- export const expoConfig: TSESLint.FlatConfig.ConfigArray = [
34
- ...(fixupConfigRules(flatCompat.extends('expo')) as unknown as TSESLint.FlatConfig.ConfigArray),
35
- {
36
- name: 'eslint-config-expo/custom',
37
- rules
38
- }
39
- ]
@@ -1,9 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.base.json",
3
- "compilerOptions": {
4
- "outDir": "./dist",
5
- "rootDir": "./src"
6
- },
7
- "include": ["src/**/*.ts"],
8
- "exclude": ["node_modules", "dist"]
9
- }
@@ -1,11 +0,0 @@
1
- import { defineConfig } from 'tsup'
2
-
3
- export default defineConfig({
4
- entry: ['src/index.ts'],
5
- format: ['esm'],
6
- dts: true,
7
- splitting: false,
8
- sourcemap: true,
9
- clean: true,
10
- target: 'es2022'
11
- })
@@ -1,45 +0,0 @@
1
- {
2
- "name": "@santi020k/eslint-config-nest",
3
- "version": "0.0.0",
4
- "description": "NestJS ESLint configuration",
5
- "type": "module",
6
- "main": "./dist/index.js",
7
- "module": "./dist/index.js",
8
- "types": "./dist/index.d.ts",
9
- "exports": {
10
- ".": {
11
- "import": "./dist/index.js",
12
- "types": "./dist/index.d.ts"
13
- }
14
- },
15
- "files": [
16
- "dist"
17
- ],
18
- "scripts": {
19
- "build": "tsup",
20
- "dev": "tsup --watch",
21
- "clean": "rm -rf dist"
22
- },
23
- "peerDependencies": {
24
- "eslint": "^9.0.0"
25
- },
26
- "dependencies": {
27
- "@santi020k/eslint-config-core": "*",
28
- "@darraghor/eslint-plugin-nestjs-typed": "^6.0.0"
29
- },
30
- "devDependencies": {
31
- "@typescript-eslint/utils": "^8.54.0",
32
- "tsup": "^8.5.1",
33
- "typescript": "^5.9.3"
34
- },
35
- "publishConfig": {
36
- "access": "public"
37
- },
38
- "license": "MIT",
39
- "author": "santi020k",
40
- "repository": {
41
- "type": "git",
42
- "url": "git+https://github.com/santi020k/eslint-config.git",
43
- "directory": "packages/nest"
44
- }
45
- }
@@ -1,14 +0,0 @@
1
- declare module '@darraghor/eslint-plugin-nestjs-typed' {
2
- import type { TSESLint } from '@typescript-eslint/utils'
3
-
4
- declare const plugin: {
5
- configs: {
6
- flatRecommended: TSESLint.FlatConfig.ConfigArray
7
- recommended: {
8
- rules: TSESLint.Linter.RulesRecord
9
- }
10
- }
11
- }
12
-
13
- export default plugin
14
- }
@@ -1,20 +0,0 @@
1
- import { rules } from './rules.js'
2
-
3
- import nestPlugin from '@darraghor/eslint-plugin-nestjs-typed'
4
- import type { TSESLint } from '@typescript-eslint/utils'
5
-
6
- /**
7
- * NestJS ESLint configuration
8
- * Includes NestJS plugin with recommended rules
9
- */
10
- export const nestConfig: TSESLint.FlatConfig.ConfigArray = [
11
- // Spread the recommended flat config from the plugin
12
- ...(nestPlugin.configs.flatRecommended as TSESLint.FlatConfig.ConfigArray),
13
- {
14
- name: 'eslint-config-nest/custom',
15
- rules
16
- }
17
- ]
18
-
19
- // Re-export rules for direct access
20
- export { rules }
@@ -1,15 +0,0 @@
1
- import { groups } from '@santi020k/eslint-config-core'
2
- import type { TSESLint } from '@typescript-eslint/utils'
3
-
4
- export const rules: TSESLint.Linter.RulesRecord = {
5
- 'simple-import-sort/imports': [
6
- 'warn',
7
- {
8
- groups: [
9
- // NestJS packages come first.
10
- ['^@nestjs'],
11
- ...groups
12
- ]
13
- }
14
- ]
15
- }
@@ -1,9 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.base.json",
3
- "compilerOptions": {
4
- "outDir": "./dist",
5
- "rootDir": "./src"
6
- },
7
- "include": ["src/**/*.ts"],
8
- "exclude": ["node_modules", "dist"]
9
- }
@@ -1,11 +0,0 @@
1
- import { defineConfig } from 'tsup'
2
-
3
- export default defineConfig({
4
- entry: ['src/index.ts'],
5
- format: ['esm'],
6
- dts: true,
7
- splitting: false,
8
- sourcemap: true,
9
- clean: true,
10
- target: 'es2022'
11
- })
@@ -1,13 +0,0 @@
1
- # @santi020k/eslint-config-next
2
-
3
- Next.js specific ESLint rules and configurations.
4
-
5
- ## Description
6
-
7
- This package provides:
8
- - Core Web Vitals recommended rules.
9
- - Next.js plugin configuration.
10
-
11
- ## Usage
12
-
13
- This package is used automatically when `ConfigOption.Next` is selected in the main configuration.
@@ -1,47 +0,0 @@
1
- {
2
- "name": "@santi020k/eslint-config-next",
3
- "version": "0.0.0",
4
- "description": "Next.js ESLint configuration",
5
- "type": "module",
6
- "main": "./dist/index.js",
7
- "module": "./dist/index.js",
8
- "types": "./dist/index.d.ts",
9
- "exports": {
10
- ".": {
11
- "import": "./dist/index.js",
12
- "types": "./dist/index.d.ts"
13
- }
14
- },
15
- "files": [
16
- "dist"
17
- ],
18
- "scripts": {
19
- "build": "tsup",
20
- "dev": "tsup --watch",
21
- "clean": "rm -rf dist"
22
- },
23
- "peerDependencies": {
24
- "eslint": "^9.0.0",
25
- "next": ">=13.0.0"
26
- },
27
- "dependencies": {
28
- "@santi020k/eslint-config-core": "*",
29
- "@santi020k/eslint-config-react": "*",
30
- "@next/eslint-plugin-next": "^16.1.6"
31
- },
32
- "devDependencies": {
33
- "@typescript-eslint/utils": "^8.54.0",
34
- "tsup": "^8.5.1",
35
- "typescript": "^5.9.3"
36
- },
37
- "publishConfig": {
38
- "access": "public"
39
- },
40
- "license": "MIT",
41
- "author": "santi020k",
42
- "repository": {
43
- "type": "git",
44
- "url": "git+https://github.com/santi020k/eslint-config.git",
45
- "directory": "packages/next"
46
- }
47
- }
@@ -1,31 +0,0 @@
1
- import { rules } from './rules.js'
2
-
3
- import pluginNext from '@next/eslint-plugin-next'
4
- import type { TSESLint } from '@typescript-eslint/utils'
5
-
6
- /**
7
- * Next.js ESLint configuration
8
- * Includes Next.js plugin with core-web-vitals rules
9
- */
10
- export const nextConfig: TSESLint.FlatConfig.ConfigArray = [
11
- {
12
- name: 'eslint-config-next/plugin',
13
- plugins: {
14
- '@next/next': pluginNext
15
- },
16
- rules: {
17
- ...pluginNext.configs['core-web-vitals'].rules
18
- }
19
- },
20
- {
21
- name: 'eslint-config-next/custom',
22
- rules
23
- },
24
- {
25
- name: 'eslint-config-next/ignores',
26
- ignores: ['.next/*']
27
- }
28
- ]
29
-
30
- // Re-export rules for direct access
31
- export { rules }
@@ -1,16 +0,0 @@
1
- import { groups } from '@santi020k/eslint-config-core'
2
- import type { TSESLint } from '@typescript-eslint/utils'
3
-
4
- export const rules: TSESLint.Linter.RulesRecord = {
5
- 'simple-import-sort/imports': [
6
- 'warn',
7
- {
8
- groups: [
9
- // Packages `react` related packages come first.
10
- ['^react'],
11
- ['^(next)(/.*|$)?'],
12
- ...groups
13
- ]
14
- }
15
- ]
16
- }
@@ -1,9 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.base.json",
3
- "compilerOptions": {
4
- "outDir": "./dist",
5
- "rootDir": "./src"
6
- },
7
- "include": ["src/**/*.ts"],
8
- "exclude": ["node_modules", "dist"]
9
- }
@@ -1,10 +0,0 @@
1
- import { defineConfig } from 'tsup'
2
-
3
- export default defineConfig({
4
- entry: ['src/index.ts'],
5
- format: ['esm'],
6
- dts: true,
7
- clean: true,
8
- splitting: false,
9
- sourcemap: true
10
- })