@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,18 +0,0 @@
1
- # @santi020k/eslint-config-optionals
2
-
3
- Optional ESLint configurations for various tools and libraries.
4
-
5
- ## Description
6
-
7
- This package provides optional configurations for:
8
- - Tailwind CSS
9
- - Vitest
10
- - CSpell
11
- - i18next
12
- - MDX
13
- - Markdown
14
- - Stencil.js
15
-
16
- ## Usage
17
-
18
- These configurations are activated via the `optionals` array in the main `eslintConfig` function.
@@ -1,55 +0,0 @@
1
- {
2
- "name": "@santi020k/eslint-config-optionals",
3
- "version": "0.0.0",
4
- "description": "Optional ESLint configurations for various tools and frameworks",
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
- "@cspell/eslint-plugin": "^9.6.4",
28
- "@eslint/compat": "^2.0.2",
29
- "@eslint/eslintrc": "^3.3.1",
30
- "@eslint/markdown": "^7.5.1",
31
- "@stencil-community/eslint-plugin": "^0.10.0",
32
- "cross-dirname": "^0.1.0",
33
- "eslint-plugin-i18next": "^6.1.3",
34
- "eslint-plugin-mdx": "^3.6.2",
35
- "eslint-plugin-tailwindcss": "^3.18.2",
36
- "eslint-plugin-testing-library": "^7.15.4",
37
- "eslint-plugin-vitest": "^0.5.4",
38
- "globals": "^17.3.0"
39
- },
40
- "devDependencies": {
41
- "@typescript-eslint/utils": "^8.54.0",
42
- "tsup": "^8.5.1",
43
- "typescript": "^5.9.3"
44
- },
45
- "publishConfig": {
46
- "access": "public"
47
- },
48
- "license": "MIT",
49
- "author": "santi020k",
50
- "repository": {
51
- "type": "git",
52
- "url": "git+https://github.com/santi020k/eslint-config.git",
53
- "directory": "packages/optionals"
54
- }
55
- }
@@ -1,25 +0,0 @@
1
- declare module 'cross-dirname' {
2
- export function getDirname(): string
3
- }
4
-
5
- declare module '@stencil-community/eslint-plugin' {
6
- const plugin: {
7
- rules: Record<string, unknown>
8
- }
9
- export default plugin
10
- }
11
-
12
- declare module 'eslint-plugin-tailwindcss' {
13
- import type { TSESLint } from '@typescript-eslint/utils'
14
- const plugin: {
15
- configs: {
16
- 'flat/recommended': TSESLint.FlatConfig.ConfigArray
17
- }
18
- }
19
- export default plugin
20
- }
21
-
22
- declare module 'eslint-plugin-i18next' {
23
- const plugin: unknown
24
- export default plugin
25
- }
@@ -1,14 +0,0 @@
1
- import pluginCspell from '@cspell/eslint-plugin'
2
-
3
- import type { TSESLint } from '@typescript-eslint/utils'
4
-
5
- /**
6
- * CSpell ESLint configuration
7
- * Enables spell checking in your codebase
8
- */
9
- export const cspell: TSESLint.FlatConfig.ConfigArray = [
10
- {
11
- name: 'optionals/cspell',
12
- plugins: { '@cspell': pluginCspell }
13
- }
14
- ]
@@ -1,19 +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
- // Initialize FlatCompat with the base directory
8
- const flatCompat = new FlatCompat({
9
- baseDirectory: getDirname(),
10
- recommendedConfig: {}
11
- })
12
-
13
- /**
14
- * i18next ESLint configuration
15
- * Enables i18next plugin for internationalization
16
- */
17
- export const i18next: TSESLint.FlatConfig.ConfigArray = [
18
- ...(fixupConfigRules(flatCompat.plugins('i18next')) as unknown as TSESLint.FlatConfig.ConfigArray)
19
- ]
@@ -1,8 +0,0 @@
1
- // Re-export all optional configurations
2
- export { cspell } from './cspell.js'
3
- export { i18next } from './i18next.js'
4
- export { markdown } from './markdown.js'
5
- export { mdx } from './mdx.js'
6
- export { stencil } from './stencil.js'
7
- export { tailwind } from './tailwind.js'
8
- export { vitest } from './vitest.js'
@@ -1,66 +0,0 @@
1
- import pluginMarkdown from '@eslint/markdown'
2
- import type { TSESLint } from '@typescript-eslint/utils'
3
-
4
- /**
5
- * Markdown ESLint configuration
6
- * Lints markdown files for common issues
7
- */
8
- export const markdown: TSESLint.FlatConfig.ConfigArray = [
9
- ...(pluginMarkdown.configs.recommended as TSESLint.FlatConfig.ConfigArray),
10
- {
11
- name: 'optionals/markdown',
12
- files: ['**/*.md'],
13
- language: 'markdown/commonmark',
14
- rules: {
15
- 'markdown/fenced-code-language': 'error',
16
- 'markdown/heading-increment': 'error',
17
- 'markdown/no-duplicate-headings': 'off',
18
- 'markdown/no-empty-links': 'error',
19
- 'markdown/no-html': 'off',
20
- 'markdown/no-invalid-label-refs': 'error',
21
- 'markdown/no-missing-label-refs': 'off',
22
- // Disable js/ts Eslint rules that conflict with markdown
23
- indent: 'off',
24
- 'no-irregular-whitespace': 'off',
25
- '@stylistic/indent': 'off',
26
- 'no-unused-vars': 'off',
27
- '@stylistic/jsx-closing-bracket-location': 'off',
28
- 'no-multi-spaces': 'off',
29
- '@stylistic/no-multi-spaces': 'off',
30
- 'comma-dangle': 'off',
31
- '@stylistic/jsx-tag-spacing': 'off'
32
- }
33
- },
34
- {
35
- name: 'optionals/markdown-code-blocks',
36
- files: ['**/*.md/*.ts', '**/*.md/*.tsx', '**/*.md/*.js', '**/*.md/*.jsx'],
37
- rules: {
38
- // Disable type-aware rules โ€” code blocks in markdown have no tsconfig
39
- '@typescript-eslint/no-unsafe-assignment': 'off',
40
- '@typescript-eslint/no-unsafe-call': 'off',
41
- '@typescript-eslint/no-unsafe-member-access': 'off',
42
- '@typescript-eslint/no-unsafe-return': 'off',
43
- '@typescript-eslint/no-unsafe-argument': 'off',
44
- '@typescript-eslint/no-floating-promises': 'off',
45
- '@typescript-eslint/no-misused-promises': 'off',
46
- '@typescript-eslint/await-thenable': 'off',
47
- '@typescript-eslint/require-await': 'off',
48
- '@typescript-eslint/restrict-template-expressions': 'off',
49
- '@typescript-eslint/no-unnecessary-type-assertion': 'off',
50
- '@typescript-eslint/unbound-method': 'off',
51
- // Disable other rules that don't make sense for code snippets
52
- 'import/no-unresolved': 'off',
53
- 'no-unused-vars': 'off',
54
- '@typescript-eslint/no-unused-vars': 'off',
55
- 'no-undef': 'off',
56
- '@typescript-eslint/consistent-type-imports': 'off',
57
- '@typescript-eslint/no-explicit-any': 'off'
58
- },
59
- languageOptions: {
60
- parserOptions: {
61
- project: null,
62
- program: null
63
- }
64
- }
65
- }
66
- ]
@@ -1,40 +0,0 @@
1
- import * as pluginMdx from 'eslint-plugin-mdx'
2
-
3
- import type { TSESLint } from '@typescript-eslint/utils'
4
-
5
- const rules: TSESLint.Linter.RulesRecord = {
6
- ...pluginMdx.flatCodeBlocks.rules,
7
- 'no-var': 'error',
8
- 'prefer-const': 'error',
9
- 'react/react-in-jsx-scope': 0,
10
- 'no-unused-vars': 'off',
11
- '@stylistic/indent': 'off',
12
- '@stylistic/jsx-closing-bracket-location': 'off',
13
- 'indent': 'off',
14
- 'no-multi-spaces': 'off',
15
- '@stylistic/no-multi-spaces': 'off',
16
- 'comma-dangle': 'off',
17
- '@stylistic/jsx-tag-spacing': 'off',
18
- 'import/export': 'off'
19
- }
20
-
21
- /**
22
- * MDX ESLint configuration
23
- * Lints MDX files with proper code block handling
24
- */
25
- export const mdx: TSESLint.FlatConfig.ConfigArray = [
26
- {
27
- files: ['**/*.mdx'],
28
- ...pluginMdx.flat,
29
- processor: pluginMdx.createRemarkProcessor({
30
- lintCodeBlocks: true,
31
- languageMapper: {}
32
- }),
33
- rules
34
- } as TSESLint.FlatConfig.Config,
35
- {
36
- files: ['**/*.mdx'],
37
- ...pluginMdx.flatCodeBlocks,
38
- rules
39
- } as TSESLint.FlatConfig.Config
40
- ]
@@ -1,48 +0,0 @@
1
- import { fixupPluginRules } from '@eslint/compat'
2
- import stencilPlugin from '@stencil-community/eslint-plugin'
3
- import type { TSESLint } from '@typescript-eslint/utils'
4
-
5
- /**
6
- * Stencil ESLint configuration
7
- * Enforces best practices for Stencil.js components
8
- */
9
- export const stencil: TSESLint.FlatConfig.ConfigArray = [
10
- {
11
- name: 'optionals/stencil',
12
- files: ['**/*.{tsx,ts}'],
13
- plugins: {
14
- '@stencil-community': fixupPluginRules({
15
- rules: stencilPlugin.rules as Record<string, unknown>
16
- } as Parameters<typeof fixupPluginRules>[0]) as unknown as TSESLint.FlatConfig.Plugin
17
- },
18
- rules: {
19
- '@stencil-community/async-methods': 'error',
20
- '@stencil-community/ban-prefix': ['error', ['stencil', 'stnl', 'st']],
21
- '@stencil-community/decorators-context': 'error',
22
- '@stencil-community/decorators-style': [
23
- 'error', {
24
- prop: 'inline',
25
- state: 'inline',
26
- element: 'inline',
27
- event: 'inline',
28
- method: 'multiline',
29
- watch: 'multiline',
30
- listen: 'multiline'
31
- }],
32
- '@stencil-community/element-type': 'error',
33
- '@stencil-community/host-data-deprecated': 'error',
34
- '@stencil-community/methods-must-be-public': 'error',
35
- '@stencil-community/no-unused-watch': 'error',
36
- '@stencil-community/own-methods-must-be-private': 'error',
37
- '@stencil-community/own-props-must-be-private': 'error',
38
- '@stencil-community/prefer-vdom-listener': 'error',
39
- '@stencil-community/props-must-be-public': 'error',
40
- '@stencil-community/props-must-be-readonly': 'error',
41
- '@stencil-community/render-returns-host': 'error',
42
- '@stencil-community/required-jsdoc': 'error',
43
- '@stencil-community/reserved-member-names': 'error',
44
- '@stencil-community/single-export': 'error',
45
- '@stencil-community/strict-mutable': 'error'
46
- }
47
- }
48
- ]
@@ -1,11 +0,0 @@
1
- import pluginTailwind from 'eslint-plugin-tailwindcss'
2
-
3
- import type { TSESLint } from '@typescript-eslint/utils'
4
-
5
- /**
6
- * Tailwind CSS ESLint configuration
7
- * Enforces Tailwind CSS best practices
8
- */
9
- export const tailwind: TSESLint.FlatConfig.ConfigArray = [
10
- ...(pluginTailwind.configs['flat/recommended'] as TSESLint.FlatConfig.ConfigArray)
11
- ]
@@ -1,61 +0,0 @@
1
- import testingLibrary from 'eslint-plugin-testing-library'
2
- import pluginVitest from 'eslint-plugin-vitest'
3
- import globals from 'globals'
4
-
5
- import { fixupPluginRules } from '@eslint/compat'
6
- import type { TSESLint } from '@typescript-eslint/utils'
7
-
8
- /**
9
- * Vitest ESLint configuration
10
- * Provides linting rules for Vitest test files with best practices
11
- */
12
- export const vitest: TSESLint.FlatConfig.ConfigArray = [
13
- {
14
- name: 'optionals/vitest',
15
- files: [
16
- 'tests/**/*.{js,ts,jsx,tsx}',
17
- '**/__tests__/**/*.{js,ts,jsx,tsx}',
18
- '**/__mocks__/**/*.{js,ts,jsx,tsx}',
19
- '**/test/**/*.{js,ts,jsx,tsx}',
20
- '**/spec/**/*.{js,ts,jsx,tsx}',
21
- '**/__spec__/**/*.{js,ts,jsx,tsx}',
22
- '**/*.test.{js,ts,jsx,tsx}',
23
- '**/*.spec.{js,ts,jsx,tsx}',
24
- 'vitest.config.{js,ts}'
25
- ],
26
- languageOptions: {
27
- globals: {
28
- ...globals.node
29
- }
30
- },
31
- plugins: {
32
- vitest: pluginVitest,
33
- 'testing-library': fixupPluginRules({
34
- rules: testingLibrary.rules
35
- } as unknown as Parameters<typeof fixupPluginRules>[0]) as unknown as TSESLint.FlatConfig.Plugin
36
- },
37
- rules: {
38
- // Vitest recommended rules
39
- ...pluginVitest.configs.recommended.rules,
40
-
41
- // Best practice rules for testing
42
- 'vitest/max-nested-describe': ['error', { max: 3 }],
43
- 'vitest/expect-expect': [
44
- 'error',
45
- {
46
- assertFunctionNames: ['expect', 'assert', 'should']
47
- }
48
- ],
49
- 'vitest/no-identical-title': 'error',
50
- 'vitest/no-focused-tests': 'error',
51
- 'vitest/no-disabled-tests': 'warn',
52
- 'vitest/prefer-to-be': 'warn',
53
- 'vitest/prefer-to-have-length': 'warn',
54
- 'vitest/valid-expect': 'error',
55
-
56
- // Disable some rules that conflict with test patterns
57
- '@typescript-eslint/no-explicit-any': 'off',
58
- '@stylistic/padding-line-between-statements': 'off'
59
- }
60
- }
61
- ]
@@ -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,14 +0,0 @@
1
- # @santi020k/eslint-config-playground
2
-
3
- Internal playground package for testing ESLint configurations against real files.
4
-
5
- ## Description
6
-
7
- This package contains various file types (React, Astro, MDX, TS) to verify that the ESLint rules are applied correctly in a real-world project structure.
8
-
9
- ## Usage
10
-
11
- Run linting on this package:
12
- ```bash
13
- npm run lint -w @santi020k/eslint-config-playground
14
- ```
@@ -1,17 +0,0 @@
1
- {
2
- "name": "@santi020k/eslint-config-playground",
3
- "private": false,
4
- "version": "0.0.0",
5
- "type": "module",
6
- "scripts": {
7
- "lint": "eslint .",
8
- "lint:fix": "eslint . --fix"
9
- },
10
- "dependencies": {
11
- "@santi020k/eslint-config-basic": "*",
12
- "eslint": "^9.39.2",
13
- "react": "^19.2.4",
14
- "react-dom": "^19.2.4",
15
- "typescript": "^5.9.3"
16
- }
17
- }
@@ -1,4 +0,0 @@
1
- // @ts-check
2
- import { ConfigOption, eslintConfig } from '../../dist/index.js'
3
-
4
- export default eslintConfig({ config: [ConfigOption.Ts, ConfigOption.Astro] })
@@ -1,4 +0,0 @@
1
- // @ts-check
2
- import { eslintConfig } from '../../dist/index.js'
3
-
4
- export default eslintConfig()
@@ -1,63 +0,0 @@
1
- // test.js
2
-
3
- // Function definitions to test various stylistic rules
4
- const myFunction1 = () => {
5
- const value = 10
6
-
7
- if (value > 5) {
8
- console.log('Value is greater than 5')
9
- } else {
10
- console.log('Value is 5 or less')
11
- }
12
-
13
- const result = value > 5 ? 'High' : 'Low'
14
- const array = [1, 2, 3]
15
-
16
- array.forEach(item => {
17
- console.log(item)
18
- })
19
-
20
- return result
21
- }
22
-
23
- // Testing object and array formatting rules
24
- const myObject = { a: 1, b: 2, c: 3 }
25
- const myArray = [1, 2, 3, 4, 5]
26
-
27
- // Testing padding and spacing rules
28
- if (myArray.length > 0) {
29
- console.log('Array is not empty')
30
- }
31
-
32
- const myFunction2 = param => !!param
33
- // Testing invalid typeof comparison
34
- const count = 0
35
-
36
- if (typeof count === 'number') {
37
- console.log('Count is a number')
38
- }
39
-
40
- // Testing unused variables
41
- // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-vars
42
- const unusedVar = 'This is unused'
43
-
44
- // Function with multiple return statements
45
- // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-vars
46
- const complexFunction = () => {
47
- if (count > 10) return 'High'
48
-
49
- if (count < 0) return 'Low'
50
-
51
- return 'Medium'
52
- }
53
-
54
- // Testing no-use-before-define
55
- myDefinedFunction()
56
-
57
- // eslint-disable-next-line func-style
58
- function myDefinedFunction() {
59
- console.log('Function called before definition')
60
- }
61
-
62
- // Export statement to test sorting
63
- export { myFunction1, myFunction2, myObject, myArray }
@@ -1,4 +0,0 @@
1
- // @ts-check
2
- import { eslintConfig, OptionalOption } from '../../dist/index.js'
3
-
4
- export default eslintConfig({ optionals: [OptionalOption.Mdx] })
@@ -1,115 +0,0 @@
1
- ---
2
- title: "The Ultimate MDX Example"
3
- description: "A complete overview of MDX capabilities with lorem ipsum content"
4
- author: "Santiago Ipsum"
5
- tags: ["mdx", "example", "components"]
6
- date: "2025-04-21"
7
- ---
8
-
9
- import { Button, Alert, FancyBox } from '../components/UI'
10
- import Note from '../components/Note'
11
- import Chart from '../components/Chart'
12
-
13
- ## ๐ŸŽข Welcome to the MDX Playground
14
-
15
- # Welcome to the MDX Playground ๐ŸŽข
16
-
17
- This is an **MDX** file. It's like Markdown, but on _steroids_ โ€” powered by **JSX**. Let's explore all the features using some _Lorem Ipsum_.
18
-
19
- ## ๐Ÿงฉ Embedded JSX Components
20
-
21
- You can embed React components directly:
22
-
23
- <Alert type="success">This is a success alert using a custom component!</Alert>
24
-
25
- ## ๐Ÿ“ฆ Importing Components
26
-
27
- You can import components like `Note`, `FancyBox`, or even charts.
28
-
29
- <Note>
30
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque feugiat.
31
- </Note>
32
-
33
- <FancyBox>
34
- <h3>Fancy Box Title</h3>
35
- <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
36
- </FancyBox>
37
-
38
- ## ๐Ÿ–ผ๏ธ Images
39
-
40
- ![Placeholder](https://via.placeholder.com/300x200.png?text=Lorem+Ipsum)
41
-
42
- ## ๐Ÿงฎ Code Blocks
43
-
44
- ### JavaScript
45
-
46
- ```js
47
- const greet = name => `Hello, ${name}!`
48
-
49
- greet('santi020k')
50
- ```
51
-
52
- ### Bash
53
-
54
- ```bash
55
- npm install @mdx-js/react
56
- ```
57
-
58
- ## ๐Ÿ“Š Embedded Dynamic Chart
59
-
60
- <Chart
61
- title="Sample Chart"
62
- data={[{ label: 'A', value: 10 }, { label: 'B', value: 20 }]}
63
- />
64
-
65
- ## ๐Ÿ”— Links
66
-
67
- Check out the [official MDX docs](https://mdxjs.com).
68
-
69
- ## ๐Ÿ—’๏ธ Lists and Tables
70
-
71
- ### Bullet List
72
-
73
- - Lorem ipsum
74
- - Dolor sit amet
75
- - Consectetur adipiscing
76
-
77
- ### Numbered List
78
-
79
- 1. First item
80
- 2. Second item
81
- 3. Third item
82
-
83
- ### Table
84
-
85
- | Feature | Supported |
86
- |----------------|-----------|
87
- | Markdown | โœ… |
88
- | JSX | โœ… |
89
- | Components | โœ… |
90
- | Frontmatter | โœ… |
91
-
92
- ## ๐ŸŽ‰ Inline JSX
93
-
94
- Hereโ€™s some inline JSX: `<span style={{ color: 'tomato' }}>Hello inline JSX!</span>`
95
-
96
- ## ๐Ÿ“Œ Export Metadata
97
-
98
- You can also export metadata if needed:
99
-
100
- ```js
101
- export const meta = {
102
- layout: 'docs',
103
- requiresAuth: false
104
- }
105
- ```
106
-
107
- ---
108
-
109
- ## ๐Ÿง  Conclusion
110
-
111
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque in odio vitae nunc luctus aliquet. MDX is powerful, flexible, and fun. Try it out in your next documentation or blog project!
112
-
113
- ```
114
-
115
- ---
@@ -1,4 +0,0 @@
1
- // @ts-check
2
- import { ConfigOption, eslintConfig } from '../../dist/index.js'
3
-
4
- export default eslintConfig({ config: [ConfigOption.React] })