Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: aotaduy/eslint-plugin-spellcheck
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: f3b3bb3acd69d5073176c6e67a9b05f0ddd0f634
Choose a base ref
...
head repository: aotaduy/eslint-plugin-spellcheck
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 45f8aef69ad600dd8b3cc60ea216221952f12c43
Choose a head ref
  • 3 commits
  • 4 files changed
  • 1 contributor

Commits on May 6, 2020

  1. remove performance

    aotaduy committed May 6, 2020
    Copy the full SHA
    f1ce24f View commit details
  2. Copy the full SHA
    0513002 View commit details
  3. bump version

    aotaduy committed May 6, 2020
    Copy the full SHA
    45f8aef View commit details
Showing with 54 additions and 80 deletions.
  1. +52 −41 README.md
  2. +0 −6 gulpfile.js
  3. +2 −3 package.json
  4. +0 −30 test/performance.js
93 changes: 52 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
@@ -2,46 +2,6 @@
[eslint](http://eslint.org) plugin to spell check words on identifiers, Strings and comments of javascript files.
[![dependencies Status](https://david-dm.org/aotaduy/eslint-plugin-spellcheck/status.svg)](https://david-dm.org/aotaduy/eslint-plugin-spellcheck)
[![Build Status](https://travis-ci.org/aotaduy/eslint-plugin-spellcheck.svg?branch=master)](https://travis-ci.org/aotaduy/eslint-plugin-spellcheck)
## Configuration

This ESLint plugin, like others, can be reconfigured to produce errors (2), warnings (1), or disabled (0) with the first numeric argument. For more information on ESLint configuration, see: http://eslint.org/docs/user-guide/configuring

````
"comments": <<Boolean>> default: true
Check Spelling inside comments
"strings": <<Boolean>>, default: true
Check Spelling inside strings
"identifiers": <<Boolean>>, default: true
Check Spelling inside identifiers
"ignoreRequire": <<Boolean>>, default: false
Exclude `require()` imports from spell-checking. Useful for excluding NPM package name false-positives.
"templates": <<Boolean>>, default: true
Check Spelling inside ES6 templates you should enable parser options for ES6 features for this to work
Refer to: [specifying-parser-options](http://eslint.org/docs/user-guide/configuring#specifying-parser-options)
"lang": <<String>>, default: "en_US"
Choose the language you want to use. Options are: "en_US", "en_CA", "en_AU", and "en_GB"
"skipWords": <<Array Of Strings>> default: []
Array of words that will not be checked.
"skipIfMatch": <<Array Of Strings>> default: []
Array of Regular Expressions the plugin will try to match the js node element value (identifier, comment, string, string template, etc) and will not check the entire node content if matched, be careful in comments because if a part of the comment is matched the entire comment will not be checked, same for strings.
i.e: "^[-\\w]+\/[-\\w\\.]+$" will ignore MIME types.
"skipWordIfMatch": <<Array Of Strings>> default: []
Array of Regular Expressions the plugin will try to match every single word that is found in the nodes (identifier, comment, string, string template, etc) and will not check the single word if matched.
i.e: "^[-\\w]+\/[-\\w\\.]+$" will ignore MIME types.
"minLength": <<Number>> default: 1
Words with a character-amount of less than the minLength will not be spell-checked.
````

Check example below

## Usage in a project

@@ -57,7 +17,16 @@ Check example below
plugins:
- spellcheck
```
3. You can also configure these rules in your `.eslintrc`. All rules defined in this plugin have to be prefixed by 'spellcheck/'
3. simplest configuration .eslintrc:

```json
"plugins": [
"spellcheck"
],
"rules": {
"spellcheck/spell-checker": ["warn"]
4. You can also configure these rules in your `.eslintrc`. All rules defined in this plugin have to be prefixed by 'spellcheck/'
```json
"plugins": [
@@ -90,6 +59,48 @@ Check example below
}
```
## Configuration Options
This ESLint plugin, like others, can be reconfigured to produce errors (2), warnings (1), or disabled (0) with the first numeric argument. For more information on ESLint configuration, see: http://eslint.org/docs/user-guide/configuring
````
"comments": <<Boolean>> default: true
Check Spelling inside comments
"strings": <<Boolean>>, default: true
Check Spelling inside strings
"identifiers": <<Boolean>>, default: true
Check Spelling inside identifiers
"ignoreRequire": <<Boolean>>, default: false
Exclude `require()` imports from spell-checking. Useful for excluding NPM package name false-positives.
"templates": <<Boolean>>, default: true
Check Spelling inside ES6 templates you should enable parser options for ES6 features for this to work
Refer to: [specifying-parser-options](http://eslint.org/docs/user-guide/configuring#specifying-parser-options)
"lang": <<String>>, default: "en_US"
Choose the language you want to use. Options are: "en_US", "en_CA", "en_AU", and "en_GB"
"skipWords": <<Array Of Strings>> default: []
Array of words that will not be checked.
"skipIfMatch": <<Array Of Strings>> default: []
Array of Regular Expressions the plugin will try to match the js node element value (identifier, comment, string, string template, etc) and will not check the entire node content if matched, be careful in comments because if a part of the comment is matched the entire comment will not be checked, same for strings.
i.e: "^[-\\w]+\/[-\\w\\.]+$" will ignore MIME types.
"skipWordIfMatch": <<Array Of Strings>> default: []
Array of Regular Expressions the plugin will try to match every single word that is found in the nodes (identifier, comment, string, string template, etc) and will not check the single word if matched.
i.e: "^[-\\w]+\/[-\\w\\.]+$" will ignore MIME types.
"minLength": <<Number>> default: 1
Words with a character-amount of less than the minLength will not be spell-checked.
````
Check example below
## Usage globally
1. Install `eslint-plugin-spellcheck` as a global package:
6 changes: 0 additions & 6 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -16,11 +16,5 @@
});
});

gulp.task('performance', function (cb) {
gulp.src([ 'test/performance.js'])
.pipe(mocha({timeout: 10000}))
.on('end', cb);
});

gulp.task('default', gulp.parallel('test'));
}());
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-plugin-spellcheck",
"version": "0.0.15",
"version": "0.0.16",
"description": "ESLint rules to spell check js files",
"main": "index.js",
"repository": {
@@ -15,11 +15,10 @@
"homepage": "https://github.com/aotaduy/eslint-plugin-spellcheck",
"scripts": {
"test": "gulp",
"performance": "gulp performance",
"lint": "eslint -c .eslintrc.json rules/*.js"
},
"dependencies": {
"globals": "^12.0.0",
"globals": "^13.0.0",
"hunspell-spellchecker": "^1.0.2",
"lodash": "^4.17.15"
},
30 changes: 0 additions & 30 deletions test/performance.js

This file was deleted.