{"id":28746149,"url":"https://github.com/ether/eslint-config-etherpad","last_synced_at":"2025-06-16T14:30:35.639Z","repository":{"id":37073515,"uuid":"312074507","full_name":"ether/eslint-config-etherpad","owner":"ether","description":"ESLint shareable config used for Etherpad and its plugins","archived":false,"fork":false,"pushed_at":"2024-04-17T19:08:54.000Z","size":344,"stargazers_count":1,"open_issues_count":8,"forks_count":4,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-06-07T05:38:33.026Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ether.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2020-11-11T19:52:02.000Z","updated_at":"2025-02-06T00:40:07.000Z","dependencies_parsed_at":"2024-03-17T00:29:21.947Z","dependency_job_id":"1037095f-3026-41f1-a719-021255c5425b","html_url":"https://github.com/ether/eslint-config-etherpad","commit_stats":{"total_commits":184,"total_committers":4,"mean_commits":46.0,"dds":"0.38586956521739135","last_synced_commit":"a441f16f54eff78d42ed9b2f5b84ea2df568c810"},"previous_names":[],"tags_count":63,"template":false,"template_full_name":null,"purl":"pkg:github/ether/eslint-config-etherpad","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ether%2Feslint-config-etherpad","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ether%2Feslint-config-etherpad/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ether%2Feslint-config-etherpad/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ether%2Feslint-config-etherpad/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ether","download_url":"https://codeload.github.com/ether/eslint-config-etherpad/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ether%2Feslint-config-etherpad/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260175603,"owners_count":22970006,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-16T14:30:34.784Z","updated_at":"2025-06-16T14:30:35.524Z","avatar_url":"https://github.com/ether.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Etherpad ESLint Shareable Config\n\nThis package contains an [ESLint](https://eslint.org/) [shareable\nconfig](https://eslint.org/docs/developer-guide/shareable-configs) that is used\nby [Etherpad](https://etherpad.org/) and Etherpad plugins in the\nhttps://github.com/ether namespace. You are encouraged to use it for your own\nEtherpad plugins so that your code stays consistent with the Etherpad codebase.\n\n## Available Configs\n\n* **`etherpad`**: Base config containing settings that are common to all files.\n* **`etherpad/node`**: Extends `etherpad` for code that runs in Node.js.\n* **`etherpad/browser`**: Extends `etherpad` for code that runs in the browser.\n* **`etherpad/tests`**: Extends `etherpad` for test code.\n* **`etherpad/tests/backend`**: Extends `etherpad/node` and `etherpad/tests` for\n  backend test code.\n* **`etherpad/tests/cypress`**: Extends `etherpad/node` and `etherpad/tests` for\n  [Cypress](https://www.cypress.io/) test code.\n* **`etherpad/tests/frontend`**: Extends `etherpad/browser` and `etherpad/tests`\n  for frontend test code.\n* **`etherpad/plugin`**: Applies the above configs to the appropriate files.\n  Assumes the plugin follows the [typical file\n  layout](https://etherpad.org/doc/latest/#index_folder_structure).\n\n## Usage in an Etherpad Plugin\n\n1.  Install the shareable config and its dependencies:\n\n    ```shell\n    npm install --save-dev eslint eslint-config-etherpad typescript\n    ```\n\n2.  Create a `.eslintrc.cjs` in your project's root directory:\n\n    ```javascript\n    'use strict';\n\n    // This is a workaround for https://github.com/eslint/eslint/issues/3458\n    require('eslint-config-etherpad/patch/modern-module-resolution');\n\n    module.exports = {\n      root: true,\n      extends: 'etherpad/plugin',\n    };\n    ```\n\n3. If you `require('ep_etherpad-lite/*')` anywhere in your server-side code, add\n   a peer dependency to your `package.json` so that the `n` ESLint plugin (for\n   Node.js) won't complain about unavailable modules:\n\n   ```json\n      \"peerDependencies\": {\n        \"ep_etherpad-lite\": \"\u003e=1.8.6\"\n      },\n   ```\n\n   Adding an entry to `peerDependencies` does not cause `npm install` to install\n   that peer dependency; you must manually install it yourself:\n\n   ```shell\n   npm install --no-save ep_etherpad-lite@file:/path/to/etherpad-lite/src\n   ```\n\n   The above command creates a symlink at `node_modules/ep_etherpad-lite` that\n   points to `/path/to/etherpad-lite/src`. Unfortunately, `npm` automatically\n   deletes that symlink whenever you run `npm install` to install, add, or\n   update a regular dependency, so remember to re-run the above command each\n   time you run `npm install`.\n\n4. *Optional but recommended:* Define a `lint` script in your `package.json` so\n   that you can run `npm run lint` to check the code:\n\n    ```json\n      \"scripts\": {\n        \"lint\": \"eslint .\"\n      },\n    ```\n\n5. *Optional but recommended:* Specify the minimum version of Node.js you\n    support (ideally this would match [Etherpad's minimum required\n    version](https://github.com/ether/etherpad-lite#requirements)) so that the\n    `n` ESLint plugin (for Node.js) can warn you when you use incompatible\n    features:\n\n    ```json\n      \"engines\": {\n        \"node\": \"\u003e=12.17.0\"\n      },\n    ```\n\n6. Apply automatic fixes. If you added the optional `lint` script to\n   `package.json`, you can run:\n\n   ```shell\n   npm run lint -- --fix\n   ```\n\n   Or you can run:\n\n   ```shell\n   npx eslint --fix .\n   ```\n\n## Overrides\n\nIf you need to tune the configs, you can specify\n[overrides](https://eslint.org/docs/user-guide/configuring#configuration-based-on-glob-patterns)\nin your `.eslintrc.cjs`. For example:\n\n```javascript\n'use strict';\n\n// This is a workaround for https://github.com/eslint/eslint/issues/3458\nrequire('eslint-config-etherpad/patch/modern-module-resolution');\n\nmodule.exports = {\n  root: true,\n  extends: 'etherpad/plugin',\n  overrides: [\n    {\n      files: ['static/js/shared/**/*'],\n      env: {\n        shared-node-browser: true,\n      },\n      extends: 'etherpad/node',\n    },\n  ],\n};\n```\n\n## Copyright and License\n\nCopyright © 2020 Richard Hansen \u003crhansen@rhansen.org\u003e\n\nLicensed under the [Apache License, Version 2.0](LICENSE) (the \"License\"); you\nmay not use this file except in compliance with the License. You may obtain a\ncopy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed\nunder the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\nCONDITIONS OF ANY KIND, either express or implied. See the License for the\nspecific language governing permissions and limitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fether%2Feslint-config-etherpad","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fether%2Feslint-config-etherpad","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fether%2Feslint-config-etherpad/lists"}