{"_id":"@aliheym/eslint-config","_rev":"4-79ff38e88f1507e856834ad570aea8a7","name":"@aliheym/eslint-config","dist-tags":{"latest":"1.0.6"},"versions":{"1.0.0":{"name":"@aliheym/eslint-config","type":"module","version":"1.0.0","packageManager":"npm@9.8.1","description":"aliheym's ESLint config","author":{"name":"aliheym","email":"aliheym@gmail.com","url":"https://github.com/aliheym/"},"license":"MIT","homepage":"https://github.com/aliheym/eslint-config","keywords":["eslint-config"],"main":"src/index.js","types":"src/index.d.ts","engines":{"node":">=20.6.1"},"scripts":{"dev":"eslint-flat-config-viewer","test":"vitest","test:coverage":"vitest --coverage","prepare":"husky","lint":"eslint ."},"dependencies":{"@eslint/js":"^8.56.0","@stylistic/eslint-plugin":"^1.6.2","confusing-browser-globals":"^1.0.11","eslint":"^8.56.0","eslint-import-resolver-typescript":"^3.6.1","eslint-plugin-eslint-comments":"^3.2.0","eslint-plugin-import":"^2.29.1","eslint-plugin-jsonc":"^2.13.0","eslint-plugin-n":"^16.6.2","eslint-plugin-perfectionist":"^2.5.0","eslint-plugin-security":"^2.1.1","eslint-plugin-toml":"^0.9.2","eslint-plugin-unicorn":"^51.0.1","eslint-plugin-yml":"^1.12.2","globals":"^14.0.0","jsonc-eslint-parser":"^2.4.0","local-pkg":"^0.5.0","toml-eslint-parser":"^0.9.3","typescript-eslint":"^7.0.1","yaml-eslint-parser":"^1.2.2"},"devDependencies":{"@vitest/coverage-v8":"^1.3.0","eslint-flat-config-viewer":"^0.1.11","husky":"^9.0.11","lint-staged":"^15.2.2","typescript":"^5.3.3","vitest":"^1.3.0"},"lint-staged":{"*":"eslint --fix"},"_id":"@aliheym/eslint-config@1.0.0","gitHead":"23acd4dc93bf8e9c333b92085e2d9e5e902cef0e","_nodeVersion":"20.6.1","_npmVersion":"9.8.1","dist":{"integrity":"sha512-DBvkxKhyrlG5WC9NiIAYTPkN9mCUNgitoWGCnEFHjKInEjop3xSCdaibW0NagLyjpMEqnjMLpY2Y0Pe8tx/o+w==","shasum":"e8e576d4d7e0864ed74deffedac98464613a0636","tarball":"https://registry.npmjs.org/@aliheym/eslint-config/-/eslint-config-1.0.0.tgz","fileCount":20,"unpackedSize":79683,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFPDU+q2VV8BUiAhSezAoRyWtBc6S2klxyLGgPJ1PseSAiAIvt8/CZwSflxwoEBmVa1U2JwIlMDZpR47chhjy0ZWTA=="}]},"_npmUser":{"name":"aliheym","email":"aliheym.dev@gmail.com"},"directories":{},"maintainers":[{"name":"aliheym","email":"aliheym.dev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/eslint-config_1.0.0_1708224384890_0.39281305945950473"},"_hasShrinkwrap":false},"1.0.3":{"name":"@aliheym/eslint-config","type":"module","version":"1.0.3","packageManager":"npm@9.8.1","description":"aliheym's ESLint config","author":{"name":"aliheym","email":"aliheym@gmail.com","url":"https://github.com/aliheym/"},"license":"MIT","homepage":"https://github.com/aliheym/eslint-config","keywords":["eslint-config"],"main":"src/index.js","types":"src/index.d.ts","engines":{"node":">=20.6.1"},"scripts":{"dev":"eslint-flat-config-viewer","test":"vitest","test:coverage":"vitest --coverage","prepare":"husky","lint":"eslint ."},"dependencies":{"@eslint/js":"^8.56.0","@stylistic/eslint-plugin":"^1.6.2","confusing-browser-globals":"^1.0.11","eslint":"^8.56.0","eslint-import-resolver-typescript":"^3.6.1","eslint-plugin-eslint-comments":"^3.2.0","eslint-plugin-import":"^2.29.1","eslint-plugin-jsonc":"^2.13.0","eslint-plugin-n":"^16.6.2","eslint-plugin-perfectionist":"^2.5.0","eslint-plugin-security":"^2.1.1","eslint-plugin-toml":"^0.9.2","eslint-plugin-unicorn":"^51.0.1","eslint-plugin-yml":"^1.12.2","globals":"^14.0.0","jsonc-eslint-parser":"^2.4.0","local-pkg":"^0.5.0","toml-eslint-parser":"^0.9.3","typescript-eslint":"^7.0.1","yaml-eslint-parser":"^1.2.2"},"devDependencies":{"@vitest/coverage-v8":"^1.3.0","bumpp":"^9.3.0","eslint-flat-config-viewer":"^0.1.11","husky":"^9.0.11","lint-staged":"^15.2.2","typescript":"^5.3.3","vitest":"^1.3.0"},"lint-staged":{"*":"eslint --fix"},"_id":"@aliheym/eslint-config@1.0.3","gitHead":"60e0d14c684925b6f70fe0bf2c4fe2bd411dd5cd","_nodeVersion":"20.11.0","_npmVersion":"10.2.4","dist":{"integrity":"sha512-zH427spSbGexBBRNzx0QThWrzH6+B1Pjrd2O5fZuvz8flVLq6nxtO5CZcK1hJEKmfgme9qwgNx35RyyniSvxEQ==","shasum":"e881017a29bf53f522a509ac9f69ad115671c3c2","tarball":"https://registry.npmjs.org/@aliheym/eslint-config/-/eslint-config-1.0.3.tgz","fileCount":20,"unpackedSize":79707,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDf3Q6abVELkkig7tc+G+jMJHaU22FtHoWtZZJ9hIzP5gIgNt32w7rNKuuB2lqlTybvpxeuBw8vwJo62Wzf22uNOQE="}]},"_npmUser":{"name":"aliheym","email":"aliheym.dev@gmail.com"},"directories":{},"maintainers":[{"name":"aliheym","email":"aliheym.dev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/eslint-config_1.0.3_1708225707741_0.6909867717647626"},"_hasShrinkwrap":false},"1.0.4":{"name":"@aliheym/eslint-config","type":"module","version":"1.0.4","packageManager":"npm@9.8.1","description":"aliheym's ESLint config","author":{"name":"aliheym","email":"aliheym@gmail.com","url":"https://github.com/aliheym/"},"license":"MIT","homepage":"https://github.com/aliheym/eslint-config","keywords":["eslint-config"],"main":"src/index.js","types":"src/index.d.ts","engines":{"node":">=20.6.1"},"scripts":{"dev":"eslint-flat-config-viewer","test":"vitest","test:coverage":"vitest --coverage","prepare":"husky","lint":"eslint ."},"dependencies":{"@eslint/js":"^8.56.0","@stylistic/eslint-plugin":"^1.6.2","confusing-browser-globals":"^1.0.11","eslint":"^8.56.0","eslint-import-resolver-typescript":"^3.6.1","eslint-plugin-eslint-comments":"^3.2.0","eslint-plugin-import":"^2.29.1","eslint-plugin-jsonc":"^2.13.0","eslint-plugin-n":"^16.6.2","eslint-plugin-perfectionist":"^2.5.0","eslint-plugin-security":"^2.1.1","eslint-plugin-toml":"^0.9.2","eslint-plugin-unicorn":"^51.0.1","eslint-plugin-yml":"^1.12.2","globals":"^14.0.0","jsonc-eslint-parser":"^2.4.0","local-pkg":"^0.5.0","toml-eslint-parser":"^0.9.3","typescript-eslint":"^7.0.1","yaml-eslint-parser":"^1.2.2"},"devDependencies":{"@vitest/coverage-v8":"^1.3.0","bumpp":"^9.3.0","eslint-flat-config-viewer":"^0.1.11","husky":"^9.0.11","lint-staged":"^15.2.2","typescript":"^5.3.3","vitest":"^1.3.0"},"lint-staged":{"*":"eslint --fix"},"_id":"@aliheym/eslint-config@1.0.4","gitHead":"30b554c4a4ceec02ac8d66914c9e1804f0995bec","_nodeVersion":"20.11.0","_npmVersion":"10.2.4","dist":{"integrity":"sha512-fyBfTpZyzwfOWQu26IbAwkHtDBsmOQu3BIdLmgaoef1QlF5Zl6x1fg8mXsXEIkGfdtvQR6TQFGE+R76z+8W2Tw==","shasum":"3eba3da9b4bcc979d356bd3b972993e5c3ae8ce2","tarball":"https://registry.npmjs.org/@aliheym/eslint-config/-/eslint-config-1.0.4.tgz","fileCount":20,"unpackedSize":79707,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDiFexvy/Jw0UFrsJMd338xF3MavF3YcBKlJCakBXICFwIgH7wniIyeyEhQ+W1MH4SfytiVHXJpog/Orhvf5vqip9c="}]},"_npmUser":{"name":"aliheym","email":"aliheym.dev@gmail.com"},"directories":{},"maintainers":[{"name":"aliheym","email":"aliheym.dev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/eslint-config_1.0.4_1708225893611_0.4426649488547931"},"_hasShrinkwrap":false},"1.0.5":{"name":"@aliheym/eslint-config","type":"module","version":"1.0.5","packageManager":"npm@9.8.1","description":"aliheym's ESLint config","author":{"name":"aliheym","email":"aliheym@gmail.com","url":"https://github.com/aliheym/"},"license":"MIT","homepage":"https://github.com/aliheym/eslint-config","keywords":["eslint-config"],"main":"src/index.js","types":"src/index.d.ts","engines":{"node":">=20.6.1"},"scripts":{"dev":"eslint-flat-config-viewer","test":"vitest","test:coverage":"vitest --coverage","prepare":"husky","lint":"eslint ."},"dependencies":{"@eslint/js":"^8.56.0","@stylistic/eslint-plugin":"^1.6.2","confusing-browser-globals":"^1.0.11","eslint":"^8.56.0","eslint-import-resolver-typescript":"^3.6.1","eslint-plugin-eslint-comments":"^3.2.0","eslint-plugin-import":"^2.29.1","eslint-plugin-jsonc":"^2.13.0","eslint-plugin-n":"^16.6.2","eslint-plugin-perfectionist":"^2.5.0","eslint-plugin-security":"^2.1.1","eslint-plugin-toml":"^0.9.2","eslint-plugin-unicorn":"^51.0.1","eslint-plugin-yml":"^1.12.2","globals":"^14.0.0","jsonc-eslint-parser":"^2.4.0","local-pkg":"^0.5.0","toml-eslint-parser":"^0.9.3","typescript-eslint":"^7.0.1","yaml-eslint-parser":"^1.2.2"},"devDependencies":{"@vitest/coverage-v8":"^1.3.0","bumpp":"^9.3.0","eslint-flat-config-viewer":"^0.1.11","husky":"^9.0.11","lint-staged":"^15.2.2","typescript":"^5.3.3","vitest":"^1.3.0"},"lint-staged":{"*":"eslint --fix"},"_id":"@aliheym/eslint-config@1.0.5","gitHead":"0b04c5cf6576abd8201db9a032ace8fd327ee63f","_nodeVersion":"20.11.0","_npmVersion":"10.2.4","dist":{"integrity":"sha512-qDToNIMdGIBdpVJpRhOvNCCHnAhIlqv4e1ofbCehopQ5Ozk2X9ub3T/MA08wmETisl2Nih2lB/k/dPJfNJD2SQ==","shasum":"d584befafb13191c0c8040d6b9161ae1f7ee7bf6","tarball":"https://registry.npmjs.org/@aliheym/eslint-config/-/eslint-config-1.0.5.tgz","fileCount":20,"unpackedSize":80660,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHut4QniGlwDag0VLW6uNFA0oIggPURJbIkTUD/I9QReAiEAhoJy8WSafIRSQu071d6uUJCzFYwXQ6P1k6Mr/D93lgA="}]},"_npmUser":{"name":"aliheym","email":"aliheym.dev@gmail.com"},"directories":{},"maintainers":[{"name":"aliheym","email":"aliheym.dev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/eslint-config_1.0.5_1708261516259_0.9628781617887521"},"_hasShrinkwrap":false},"1.0.6":{"name":"@aliheym/eslint-config","type":"module","version":"1.0.6","packageManager":"npm@9.8.1","description":"aliheym's ESLint config","author":{"name":"aliheym","email":"aliheym@gmail.com","url":"https://github.com/aliheym/"},"license":"MIT","homepage":"https://github.com/aliheym/eslint-config","keywords":["eslint-config"],"main":"src/index.js","types":"src/index.d.ts","engines":{"node":">=20.6.1"},"scripts":{"dev":"eslint-flat-config-viewer","test":"vitest","test:coverage":"vitest --coverage","prepare":"husky","lint":"eslint ."},"dependencies":{"@eslint/js":"^8.57.0","@stylistic/eslint-plugin":"^1.6.2","confusing-browser-globals":"^1.0.11","eslint":"^8.57.0","eslint-import-resolver-typescript":"^3.6.1","eslint-plugin-eslint-comments":"^3.2.0","eslint-plugin-import":"^2.29.1","eslint-plugin-jsonc":"^2.13.0","eslint-plugin-n":"^16.6.2","eslint-plugin-perfectionist":"^2.5.0","eslint-plugin-security":"^2.1.1","eslint-plugin-toml":"^0.9.2","eslint-plugin-unicorn":"^51.0.1","eslint-plugin-yml":"^1.12.2","globals":"^14.0.0","jsonc-eslint-parser":"^2.4.0","local-pkg":"^0.5.0","lodash.merge":"^4.6.2","toml-eslint-parser":"^0.9.3","typescript-eslint":"^7.0.2","yaml-eslint-parser":"^1.2.2"},"devDependencies":{"@vitest/coverage-v8":"^1.3.1","bumpp":"^9.3.0","eslint-flat-config-viewer":"^0.1.11","husky":"^9.0.11","lint-staged":"^15.2.2","typescript":"^5.3.3","vitest":"^1.3.1"},"lint-staged":{"*":"eslint --fix"},"_id":"@aliheym/eslint-config@1.0.6","gitHead":"3c39e66a6f526c39381452d6f0f6a5897afce028","_nodeVersion":"20.11.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-bQLYOw3V1kcKUC78dzupThyYcWvMiMgd8lT0JJEIQAt2gRoynMnJOq1CJaxr3n51eWINImSkUiag9GYogHQSXA==","shasum":"29f0b7258eae74b4f52702341a5c654b575a4063","tarball":"https://registry.npmjs.org/@aliheym/eslint-config/-/eslint-config-1.0.6.tgz","fileCount":20,"unpackedSize":80893,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFWUBngEFe9RimzU5ID5isrrH1oHD+HLzZO2kwrJyyPaAiA/bt+c4NmkdVmvRCnpryfUMp4/hjcE4c4fl+w4XRcevw=="}]},"_npmUser":{"name":"aliheym","email":"aliheym.dev@gmail.com"},"directories":{},"maintainers":[{"name":"aliheym","email":"aliheym.dev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/eslint-config_1.0.6_1708927573674_0.7707758869304344"},"_hasShrinkwrap":false}},"time":{"created":"2024-02-18T02:46:24.810Z","1.0.0":"2024-02-18T02:46:25.047Z","modified":"2024-02-26T06:06:14.515Z","1.0.3":"2024-02-18T03:08:27.983Z","1.0.4":"2024-02-18T03:11:33.781Z","1.0.5":"2024-02-18T13:05:16.471Z","1.0.6":"2024-02-26T06:06:13.876Z"},"maintainers":[{"name":"aliheym","email":"aliheym.dev@gmail.com"}],"description":"aliheym's ESLint config","homepage":"https://github.com/aliheym/eslint-config","keywords":["eslint-config"],"author":{"name":"aliheym","email":"aliheym@gmail.com","url":"https://github.com/aliheym/"},"license":"MIT","readme":"# @aliheym/eslint-config\n\n[![npm](https://img.shields.io/npm/v/@aliheym/eslint-config?color=444&label=)](https://npmjs.com/package/@aliheym/eslint-config)\n\nThis package is inspired by [Anthony's ESLint config preset](https://github.com/antfu/eslint-config) and [Airbnb's ESLint config preset](https://github.com/airbnb/javascript).\n\n> [!IMPORTANT]\n> This config is intended to work only with ESM projects. Your project needs\n> to be ESM too.\n\n## Usage\n\n### Install\n\n```bash\nnpm i --save-dev eslint @aliheym/eslint-config\n```\n\n### Create config file\n\nCreate a file named `eslint.config.js` in the root of your project and add the following:\n\n```js\nimport aliheym from '@aliheym/eslint-config';\n\nexport default aliheym();\n```\n\n> [!TIP]\n> ESLint only detects `eslint.config.js` as the flag config entry.\n\n### Add script for package.json\n\nFor example:\n\n```json\n{\n  \"scripts\": {\n    \"lint\": \"eslint .\",\n    \"lint:fix\": \"eslint . --fix\"\n  }\n}\n```\n\n## Editor Integration\n\n### VS Code\n\nThere is a plugin called [VS Code ESLint extension](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint). Install it.\n\nAdd the following to your `.vscode/settings.json`:\n\n```jsonc\n{\n  // Enable the ESlint flat config support\n  \"eslint.experimental.useFlatConfig\": true,\n\n  // Disable the default formatter, use eslint instead\n  \"prettier.enable\": false,\n  \"editor.formatOnSave\": false,\n\n  // Auto fix\n  \"editor.codeActionsOnSave\": {\n    \"source.fixAll.eslint\": \"explicit\",\n    \"source.organizeImports\": \"never\"\n  },\n\n  // Silent the stylistic rules in the editor, but still auto fix them\n  \"eslint.rules.customizations\": [\n    { \"rule\": \"@stylistic/*\", \"severity\": \"off\" },\n    { \"rule\": \"*-indent\", \"severity\": \"off\" },\n    { \"rule\": \"*-spacing\", \"severity\": \"off\" },\n    { \"rule\": \"*-spaces\", \"severity\": \"off\" },\n    { \"rule\": \"*-order\", \"severity\": \"off\" },\n    { \"rule\": \"*-dangle\", \"severity\": \"off\" },\n    { \"rule\": \"*-newline\", \"severity\": \"off\" },\n    { \"rule\": \"*quotes\", \"severity\": \"off\" },\n    { \"rule\": \"*semi\", \"severity\": \"off\" }\n  ],\n\n  // Enable eslint for all supported languages\n  \"eslint.validate\": [\n    \"javascript\",\n    \"typescript\",\n    \"json\",\n    \"jsonc\",\n    \"yaml\",\n    \"toml\"\n  ]\n}\n```\n\n## Customization\n\nNormally, you only need to import the `@aliheym/eslint-config`.\n\n```js\nimport aliheym from '@aliheym/eslint-config';\n\nexport default aliheym();\n```\n\nHowever, you can configure each integration, for example:\n\n```js\nimport aliheym from '@aliheym/eslint-config';\n\nexport default aliheym({\n  // Disable some files and directories\n  ignores: [\n    '**/.temporary',\n  ],\n\n  // Customize the stylistic rules\n  stylistic: {\n    indent: 4,\n    quotes: 'double',\n  },\n\n  // Enable Node.js linting\n  node: {\n    overrides: {\n      // ...\n    }\n  },\n\n  // Disable YAML support\n  yaml: false,\n\n  // Override Typescript rules\n  typescript: {\n    overrides: {\n      rules: {\n        '@typescript-eslint/no-explicit-any': 'off',\n      },\n    }\n  },\n});\n```\n\n> [!TIP]\n> The function has TS types, so you can check them to see all the available options.\n\nYou can also pass any number of custom config overrides, for example:\n\n```js\nimport aliheym from '@aliheym/eslint-config';\n\nexport default aliheym(\n  {\n    // Configures the base config\n  },\n  // From the second arguments they are ESLint configs\n  {\n    files: ['**/*.ts'],\n    rules: {\n      '@stylistic/semi': ['error', 'never'],\n    },\n  },\n  {\n    // Without `files`, they are general rules for all files\n    rules: {},\n  },\n);\n```\n\n## Optional Rules\n\nThis config also provides some optional plugins/rules for extended usage.\n\n\n### eslint-plugin-perfectionist\n\n[`eslint-plugin-perfectionist`](https://github.com/azat-io/eslint-plugin-perfectionist) allows you to sorted object keys, imports, etc, with auto-fix.\n\nThe plugin is installed but no rules are enabled by default.\n\nIt's recommended to opt-in on each file individually using [configuration comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1).\n\n```js\n/* eslint perfectionist/sort-objects: \"error\" */\nconst objectWantedToSort = {\n  a: 2,\n  b: 1,\n  c: 3,\n};\n/* eslint perfectionist/sort-objects: \"off\" */\n```\n\n### Type Aware Rules\n\nYou can optionally enable the [type aware rules](https://typescript-eslint.io/linting/typed-linting/) by passing `tsconfigPath` to the `typescript` config:\n\n```js\nimport aliheym from '@aliheym/eslint-config';\n\nexport default aliheym({\n  typescript: {\n    tsconfigPath: 'tsconfig.json',\n  },\n});\n```\n\n## Lint Staged\n\nYou can use `lint-staged` to lint and auto-fix before every commit. Install it:\n\n```bash\nnpm i -D lint-staged\n```\n\nAnd then change your `package.json`:\n\n```json\n{\n  \"lint-staged\": {\n    \"*\": \"eslint --fix\"\n  }\n}\n```\n\nYou can combine it with git hooks. For more details, see the [husky](https://typicode.github.io/husky/) or [simple-git-hooks](https://github.com/toplenboren/simple-git-hooks).\n\n## ESlint Config Viewer\n\nThere are a useful tool, that you can use to view what rules are enabled in your project and apply them to what files - [eslint-flat-config-viewer](https://github.com/antfu/eslint-flat-config-viewer).\n\nGo to your project root (the same directory where your `eslint.config.js` is) and run:\n\n```bash\nnpx eslint-flat-config-viewer\n```\n","readmeFilename":"README.md"}