Shared eslint config
Перейти к файлу
dependabot[bot] 28a0f50927
chore(deps-dev): Bump eslint-plugin-n from 16.6.2 to 17.13.1
Bumps [eslint-plugin-n](https://github.com/eslint-community/eslint-plugin-n) from 16.6.2 to 17.13.1.
- [Release notes](https://github.com/eslint-community/eslint-plugin-n/releases)
- [Changelog](https://github.com/eslint-community/eslint-plugin-n/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint-community/eslint-plugin-n/compare/16.6.2...v17.13.1)

---
updated-dependencies:
- dependency-name: eslint-plugin-n
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-07 16:06:50 +00:00
.github chore(deps): Bump actions/setup-node from 4.0.4 to 4.1.0 2024-10-24 15:46:00 +00:00
LICENSES ci: Add reuse action 2024-07-08 17:31:12 +02:00
parts fix(typescript): do not require returns type in jsdoc 2024-10-21 09:39:32 +02:00
tests chore: Add SPDX header 2024-07-08 17:30:41 +02:00
.git-blame-ignore-revs enh(git): ignore formatting commits in git blame 2024-10-11 22:33:26 +02:00
.gitignore chore: Add SPDX header 2024-07-08 17:30:41 +02:00
.npmignore chore: Add SPDX header 2024-07-08 17:30:41 +02:00
AUTHORS.md chore: Add SPDX header 2024-07-08 17:30:41 +02:00
CHANGELOG.md chore: Add SPDX header 2024-07-08 17:30:41 +02:00
LICENSE Initial commit 2019-09-23 18:21:14 +02:00
README.md docs: Add reuse badge 2024-07-08 17:32:26 +02:00
REUSE.toml chore: Add SPDX header 2024-07-08 17:30:41 +02:00
index.js chore: Add SPDX header 2024-07-08 17:30:41 +02:00
package-lock.json chore(deps-dev): Bump eslint-plugin-n from 16.6.2 to 17.13.1 2024-11-07 16:06:50 +00:00
package.json chore(deps-dev): Bump eslint-plugin-n from 16.6.2 to 17.13.1 2024-11-07 16:06:50 +00:00
typescript.js chore: Add SPDX header 2024-07-08 17:30:41 +02:00
vue3.js chore: Add SPDX header 2024-07-08 17:30:41 +02:00

README.md

@nextcloud/eslint-config

REUSE status npm last version Lint status Dependabot status

This is a package containing the unified global eslint config used by all nextcloud apps. It contains the necessary dependencies and peerDependencies so that other apps cannot update if this config does not support it. Please always use dependabot to update your apps, OR pay attention to the peer dependencies error messages!

Installation

npm install @nextcloud/eslint-config --save-dev

Usage

Add a file .eslintrc.js in the root directory of your app repository with the following content:

module.exports = {
	extends: [
		'@nextcloud',
	],
}

Usage with Typescript projects

If your projects uses Typescript for vue files, like <script lang="ts"> then use the Typescript config instead:

Add a file .eslintrc.js in the root directory of your app repository with the following content:

module.exports = {
	extends: [
		'@nextcloud/eslint-config/typescript',
	],
}

Usage with Vue 3 projects

If your projects uses Vue 3 you have to use the vue3 sub-configuration. This configuration also includes Typescript support by default.

Add a file .eslintrc.js in the root directory of your app repository with the following content:

module.exports = {
	extends: [
		'@nextcloud/eslint-config/vue3',
	],
}

Release new version

  1. Update CHANGELOG.md file with the latest changes
  2. Bump the package version with npm version
  3. Push version bump commit
  4. Create a new release with proper changelog https://github.com/nextcloud-libraries/eslint-config/releases/new