{"name":"@eslint/eslintrc","version":"3.2.0","description":"The legacy ESLintRC config file format for ESLint","type":"module","main":"./dist/eslintrc.cjs","exports":{".":{"import":"./lib/index.js","require":"./dist/eslintrc.cjs"},"./package.json":"./package.json","./universal":{"import":"./lib/index-universal.js","require":"./dist/eslintrc-universal.cjs"}},"publishConfig":{"access":"public"},"scripts":{"build":"rollup -c","lint":"eslint . --report-unused-disable-directives","lint:fix":"npm run lint -- --fix","prepare":"npm run build","release:generate:latest":"eslint-generate-release","release:generate:alpha":"eslint-generate-prerelease alpha","release:generate:beta":"eslint-generate-prerelease beta","release:generate:rc":"eslint-generate-prerelease rc","release:publish":"eslint-publish-release","test":"mocha -R progress -c 'tests/lib/*.cjs' && c8 mocha -R progress -c 'tests/lib/**/*.js'"},"repository":{"type":"git","url":"git+https://github.com/eslint/eslintrc.git"},"funding":"https://opencollective.com/eslint","keywords":["ESLint","ESLintRC","Configuration"],"author":{"name":"Nicholas C. Zakas"},"license":"MIT","bugs":{"url":"https://github.com/eslint/eslintrc/issues"},"homepage":"https://github.com/eslint/eslintrc#readme","devDependencies":{"c8":"^7.7.3","chai":"^4.3.4","eslint":"^7.31.0","eslint-config-eslint":"^7.0.0","eslint-plugin-jsdoc":"^35.4.1","eslint-plugin-node":"^11.1.0","eslint-release":"^3.2.0","fs-teardown":"^0.1.3","mocha":"^9.0.3","rollup":"^2.70.1","shelljs":"^0.8.5","sinon":"^11.1.2","temp-dir":"^2.0.0"},"dependencies":{"ajv":"^6.12.4","debug":"^4.3.2","espree":"^10.0.1","globals":"^14.0.0","ignore":"^5.2.0","import-fresh":"^3.2.1","js-yaml":"^4.1.0","minimatch":"^3.1.2","strip-json-comments":"^3.1.1"},"engines":{"node":"^18.18.0 || ^20.9.0 || >=21.1.0"},"_id":"@eslint/eslintrc@3.2.0","gitHead":"f05aea7eeca2b99eae6310954cb25d3a904cc605","_nodeVersion":"22.11.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w==","shasum":"57470ac4e2e283a6bf76044d63281196e370542c","tarball":"http://registry-npm.ywwl.com/@eslint/eslintrc/download/@eslint/eslintrc-3.2.0.tgz","fileCount":29,"unpackedSize":679783,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@eslint%2feslintrc@3.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDC1uCIorp73TLMPPPznoE7H9ZJBi2/jubNNhGAGEUbVQIhAPbGbTje5y4yBH5Fm6T7Mj4LYOuSrHNhOTit6Bf7C77U"}],"size":131442,"noattachment":false,"key":"/@eslint/eslintrc/-/@eslint/eslintrc-3.2.0.tgz"},"_npmUser":{"name":"eslintbot","email":"nicholas@eslint.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/eslintrc_3.2.0_1731688498352_0.20476424755903166"},"_hasShrinkwrap":false,"readme":"# ESLintRC Library\n\nThis repository contains the legacy ESLintRC configuration file format for ESLint. This package is not intended for use outside of the ESLint ecosystem. It is ESLint-specific and not intended for use in other programs.\n\n**Note:** This package is frozen except for critical bug fixes as ESLint moves to a new config system.\n\n## Installation\n\nYou can install the package as follows:\n\n```\nnpm install @eslint/eslintrc --save-dev\n\n# or\n\nyarn add @eslint/eslintrc -D\n```\n\n## Usage (ESM)\n\nThe primary class in this package is `FlatCompat`, which is a utility to translate ESLintRC-style configs into flat configs. Here's how you use it inside of your `eslint.config.js` file:\n\n```js\nimport { FlatCompat } from \"@eslint/eslintrc\";\nimport js from \"@eslint/js\";\nimport path from \"path\";\nimport { fileURLToPath } from \"url\";\n\n// mimic CommonJS variables -- not needed if using CommonJS\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = path.dirname(__filename);\n\nconst compat = new FlatCompat({\n    baseDirectory: __dirname,                  // optional; default: process.cwd()\n    resolvePluginsRelativeTo: __dirname,       // optional\n    recommendedConfig: js.configs.recommended, // optional unless you're using \"eslint:recommended\"\n    allConfig: js.configs.all,                 // optional unless you're using \"eslint:all\"\n});\n\nexport default [\n\n    // mimic ESLintRC-style extends\n    ...compat.extends(\"standard\", \"example\", \"plugin:react/recommended\"),\n\n    // mimic environments\n    ...compat.env({\n        es2020: true,\n        node: true\n    }),\n\n    // mimic plugins\n    ...compat.plugins(\"jsx-a11y\", \"react\"),\n\n    // translate an entire config\n    ...compat.config({\n        plugins: [\"jsx-a11y\", \"react\"],\n        extends: \"standard\",\n        env: {\n            es2020: true,\n            node: true\n        },\n        rules: {\n            semi: \"error\"\n        }\n    })\n];\n```\n\n## Usage (CommonJS)\n\nUsing `FlatCompat` in CommonJS files is similar to ESM, but you'll use `require()` and `module.exports` instead of `import` and `export`. Here's how you use it inside of your `eslint.config.js` CommonJS file:\n\n```js\nconst { FlatCompat } = require(\"@eslint/eslintrc\");\nconst js = require(\"@eslint/js\");\n\nconst compat = new FlatCompat({\n    baseDirectory: __dirname,                  // optional; default: process.cwd()\n    resolvePluginsRelativeTo: __dirname,       // optional\n    recommendedConfig: js.configs.recommended, // optional unless using \"eslint:recommended\"\n    allConfig: js.configs.all,                 // optional unless using \"eslint:all\"\n});\n\nmodule.exports = [\n\n    // mimic ESLintRC-style extends\n    ...compat.extends(\"standard\", \"example\", \"plugin:react/recommended\"),\n\n    // mimic environments\n    ...compat.env({\n        es2020: true,\n        node: true\n    }),\n\n    // mimic plugins\n    ...compat.plugins(\"jsx-a11y\", \"react\"),\n\n    // translate an entire config\n    ...compat.config({\n        plugins: [\"jsx-a11y\", \"react\"],\n        extends: \"standard\",\n        env: {\n            es2020: true,\n            node: true\n        },\n        rules: {\n            semi: \"error\"\n        }\n    })\n];\n```\n\n## Troubleshooting\n\n**TypeError: Missing parameter 'recommendedConfig' in FlatCompat constructor**\n\nThe `recommendedConfig` option is required when any config uses `eslint:recommended`, including any config in an `extends` clause. To fix this, follow the example above using `@eslint/js` to provide the `eslint:recommended` config.\n\n**TypeError: Missing parameter 'allConfig' in FlatCompat constructor**\n\nThe `allConfig` option is required when any config uses `eslint:all`, including any config in an `extends` clause. To fix this, follow the example above using `@eslint/js` to provide the `eslint:all` config.\n\n\n## License\n\nMIT License\n","publish_time":1731688498562,"maintainers":[{"name":"openjsfoundation","email":"npm@openjsf.org"},{"name":"eslintbot","email":"nicholas@eslint.org"}],"_cnpm_publish_time":1731688498562,"dist-tags":{"latest":"3.3.7"}}