Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/apache/cordova-eslint
Apache Cordova - ESLint
https://github.com/apache/cordova-eslint
cordova eslint javascript
Last synced: 3 months ago
JSON representation
Apache Cordova - ESLint
- Host: GitHub
- URL: https://github.com/apache/cordova-eslint
- Owner: apache
- License: apache-2.0
- Created: 2019-10-21T17:34:10.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-08-03T06:01:56.000Z (5 months ago)
- Last Synced: 2024-10-01T01:05:55.372Z (3 months ago)
- Topics: cordova, eslint, javascript
- Language: JavaScript
- Homepage: https://cordova.apache.org/
- Size: 300 KB
- Stars: 6
- Watchers: 10
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @cordova/eslint-config
[![NPM](https://nodei.co/npm/cordova-eslint.png)](https://nodei.co/npm/cordova-eslint/)
[![Node CI](https://github.com/apache/cordova-eslint/workflows/Node%20CI/badge.svg?branch=master)](https://github.com/apache/cordova-eslint/actions?query=branch%3Amaster)
This repository centralizes the ESLint configuration used for Cordova's development.
## Installation
`@cordova/eslint-config` comes with all plugins configs and even `eslint` itself. So all you need to do to get started is:
```shell
npm i -D @cordova/eslint-config
```## Usage
```yml
# In package.json
{
"scripts": {
"lint": "eslint ."
}
}
``````yml
# In .eslintrc.yml
root: trueextends: '@cordova/eslint-config/node'
overrides:
- files: [spec/**/*.js]
extends: '@cordova/eslint-config/node-tests'- files: [cordova-js-src/**/*.js]
extends: '@cordova/eslint-config/browser'
```## Reference
This package exposes the following shareable ESLint configurations:
### `@cordova/eslint-config/node` (or simply `@cordova`)
For linting scripts intended to be run with Node.js.
### `@cordova/eslint-config/node-tests`
For linting Jasmine tests of Cordova's Node.js scripts.
### `@cordova/eslint-config/browser`
For linting cordova-style CommonJS modules intended to be run in the browser (before they are bundled).
### `@cordova/eslint-config/browser-tests`
For linting Jasmine tests of Cordova's browser code.