@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.
- package/README.md +2 -272
- package/dist/index.d.ts +21 -0
- package/dist/index.js +127 -0
- package/package.json +47 -50
- package/.agent/rules/context.md +0 -78
- package/.agent/rules/guidelines.md +0 -124
- package/.editorconfig +0 -13
- package/.env.example +0 -8
- package/.github/CODEOWNERS +0 -2
- package/.github/DISCUSSION_TEMPLATE/rfcs.yml +0 -21
- package/.github/DISCUSSION_TEMPLATE/technical-discussions.yml +0 -21
- package/.github/FUNDING.yml +0 -2
- package/.github/ISSUE_TEMPLATE/README.md +0 -13
- package/.github/ISSUE_TEMPLATE/bug_report.yml +0 -69
- package/.github/ISSUE_TEMPLATE/config.yml +0 -8
- package/.github/ISSUE_TEMPLATE/feature_request.yml +0 -43
- package/.github/ISSUE_TEMPLATE/question.yml +0 -22
- package/.github/SECURITY.md +0 -12
- package/.github/SPONSORSHIPS.md +0 -27
- package/.github/dependabot.yml +0 -45
- package/.github/labeler.yml +0 -46
- package/.github/pull_request_template.md +0 -56
- package/.github/workflows/assign-issues.yml +0 -18
- package/.github/workflows/audit.yml +0 -22
- package/.github/workflows/build.yml +0 -29
- package/.github/workflows/codeql.yml +0 -40
- package/.github/workflows/docs.yml +0 -49
- package/.github/workflows/labeler.yml +0 -18
- package/.github/workflows/publish.yml +0 -24
- package/.github/workflows/release.yml +0 -35
- package/.github/workflows/size-check.yml +0 -23
- package/.github/workflows/stale.yml +0 -31
- package/.nvmrc +0 -1
- package/.vscode/extensions.json +0 -10
- package/.vscode/settings.json +0 -55
- package/CHANGELOG.md +0 -16
- package/CONTRIBUTING.md +0 -194
- package/DEVELOPMENT.md +0 -4
- package/LICENSE +0 -21
- package/config/.husky/commit-msg +0 -9
- package/config/.husky/pre-commit +0 -1
- package/config/.husky/pre-push +0 -1
- package/config/.husky/prepare-commit-msg +0 -1
- package/cspell.config.yaml +0 -2
- package/eslint.config.js +0 -21
- package/llms.txt +0 -72
- package/packages/astro/README.md +0 -13
- package/packages/astro/package.json +0 -45
- package/packages/astro/src/ambient.d.ts +0 -10
- package/packages/astro/src/index.ts +0 -18
- package/packages/astro/src/rules.ts +0 -29
- package/packages/astro/tsconfig.json +0 -9
- package/packages/astro/tsup.config.ts +0 -11
- package/packages/basic/README.md +0 -33
- package/packages/basic/package.json +0 -55
- package/packages/basic/src/index.ts +0 -110
- package/packages/basic/tsconfig.json +0 -9
- package/packages/basic/tsup.config.ts +0 -18
- package/packages/core/README.md +0 -14
- package/packages/core/index.ts +0 -14
- package/packages/core/package.json +0 -61
- package/packages/core/src/ambient.d.ts +0 -61
- package/packages/core/src/index.ts +0 -75
- package/packages/core/src/rules.ts +0 -157
- package/packages/core/src/settings/gitignore.ts +0 -10
- package/packages/core/src/settings/index.ts +0 -1
- package/packages/core/src/types.ts +0 -57
- package/packages/core/src/utils/index.ts +0 -28
- package/packages/core/tsconfig.json +0 -9
- package/packages/core/tsup.config.ts +0 -10
- package/packages/expo/README.md +0 -13
- package/packages/expo/package.json +0 -48
- package/packages/expo/src/ambient.d.ts +0 -3
- package/packages/expo/src/index.ts +0 -39
- package/packages/expo/tsconfig.json +0 -9
- package/packages/expo/tsup.config.ts +0 -11
- package/packages/nest/package.json +0 -45
- package/packages/nest/src/ambient.d.ts +0 -14
- package/packages/nest/src/index.ts +0 -20
- package/packages/nest/src/rules.ts +0 -15
- package/packages/nest/tsconfig.json +0 -9
- package/packages/nest/tsup.config.ts +0 -11
- package/packages/next/README.md +0 -13
- package/packages/next/package.json +0 -47
- package/packages/next/src/index.ts +0 -31
- package/packages/next/src/rules.ts +0 -16
- package/packages/next/tsconfig.json +0 -9
- package/packages/next/tsup.config.ts +0 -10
- package/packages/optionals/README.md +0 -18
- package/packages/optionals/package.json +0 -55
- package/packages/optionals/src/ambient.d.ts +0 -25
- package/packages/optionals/src/cspell.ts +0 -14
- package/packages/optionals/src/i18next.ts +0 -19
- package/packages/optionals/src/index.ts +0 -8
- package/packages/optionals/src/markdown.ts +0 -66
- package/packages/optionals/src/mdx.ts +0 -40
- package/packages/optionals/src/stencil.ts +0 -48
- package/packages/optionals/src/tailwind.ts +0 -11
- package/packages/optionals/src/vitest.ts +0 -61
- package/packages/optionals/tsconfig.json +0 -9
- package/packages/optionals/tsup.config.ts +0 -11
- package/packages/playground/README.md +0 -14
- package/packages/playground/package.json +0 -17
- package/packages/playground/src/astro/eslint.config.js +0 -4
- package/packages/playground/src/js/eslint.config.js +0 -4
- package/packages/playground/src/js/index.test.js +0 -63
- package/packages/playground/src/mdx/eslint.config.js +0 -4
- package/packages/playground/src/mdx/index.mdx +0 -115
- package/packages/playground/src/react/eslint.config.js +0 -4
- package/packages/playground/src/react/index.test.jsx +0 -130
- package/packages/playground/src/ts/eslint.config.js +0 -4
- package/packages/playground/src/ts/index.test.ts +0 -61
- package/packages/playground/src/ts/tsconfig.json +0 -3
- package/packages/playground/tsconfig.json +0 -9
- package/packages/react/README.md +0 -14
- package/packages/react/index.ts +0 -26
- package/packages/react/package.json +0 -49
- package/packages/react/src/ambient.d.ts +0 -23
- package/packages/react/src/index.ts +0 -52
- package/packages/react/src/rules.ts +0 -47
- package/packages/react/tsconfig.json +0 -9
- package/packages/react/tsup.config.ts +0 -10
- package/packages/tests/README.md +0 -17
- package/packages/tests/package.json +0 -21
- package/packages/tests/src/__snapshots__/snapshots.test.ts.snap +0 -654
- package/packages/tests/src/composition.test.ts +0 -171
- package/packages/tests/src/configs.test.ts +0 -118
- package/packages/tests/src/rules.test.ts +0 -60
- package/packages/tests/src/snapshots.test.ts +0 -126
- package/packages/tests/tsconfig.json +0 -10
- package/packages/tests/vitest.config.ts +0 -8
- package/packages/typescript/README.md +0 -14
- package/packages/typescript/package.json +0 -47
- package/packages/typescript/src/index.ts +0 -32
- package/packages/typescript/src/rules.ts +0 -36
- package/packages/typescript/tsconfig.json +0 -9
- package/packages/typescript/tsup.config.ts +0 -10
- package/tsconfig.base.json +0 -20
- package/tsconfig.docs.json +0 -18
- package/turbo.json +0 -19
- package/typedoc.config.mjs +0 -25
- 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
|
-
}
|
package/packages/expo/README.md
DELETED
|
@@ -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,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,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
|
-
}
|
package/packages/next/README.md
DELETED
|
@@ -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
|
-
}
|