Socket
Socket
Sign inDemoInstall

eslint-plugin-flowtype

Package Overview
Dependencies
Maintainers
1
Versions
185
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-flowtype - npm Package Compare versions

Comparing version 2.24.0 to 2.25.0

10

CHANGELOG.md

@@ -5,2 +5,12 @@ # Change Log

<a name="2.25.0"></a>
# [2.25.0](https://github.com/gajus/eslint-plugin-flowtype/compare/v2.24.0...v2.25.0) (2016-10-25)
### Features
* Add excludeParameterMatch option to require-parameter-type ([d9cfbbe](https://github.com/gajus/eslint-plugin-flowtype/commit/d9cfbbe))
<a name="2.24.0"></a>

@@ -7,0 +17,0 @@ # [2.24.0](https://github.com/gajus/eslint-plugin-flowtype/compare/v2.23.1...v2.24.0) (2016-10-25)

46

CONTRIBUTING.md

@@ -1,13 +0,45 @@

# Updating documentation
# Contributing
[./README.md](./README.md) is a generated file. The source of the file is [./.README/README.md](/.README/README.md).
**`README.md` is a generated file. Do not edit it directly.** Edit the files inside `.README` instead.
## To make a change to the documentation:
## Pre-Commit Hook
1. Update [./.README/README.md](/.README/README.md)
When making a commit, the following Pre-Commit hooks run:
A CI service will build and publish the new documentation.
* tests
* lint
* commit message validation (see "Commit Messages" below)
## To add documentation for a rule:
## Commit Messages
All commit messages must begin with one of the following prefixes:
* `fix: `
* `feat: `
* `refactor: `
* `docs: `
* `chore: `
The prefix is used to bump the correct segment of the version number automatically during deploy.
## Tests
Run them with `npm t`.
## Lint
Run with `npm run lint`.
## Adding a Rule
### Source & Tests
1. Create a file in `tests/rules/assertions` named the `camelCase` version of your rule name with the following template:
* `export default { invalid: [], valid: [] }`
2. Add your test file to `tests/index.js`
3. Create a file in `src/rules` named the `camelCase` version of your rule name
4. Add your rule file to `src/index.js`
### Adding Documentation
1. Create new file in `./README/rules/[rule-name].md`.

@@ -20,2 +52,2 @@ * Use [./.README/rules/require-valid-file-annotation.md](./.README/rules/require-valid-file-annotation.md) as a template.

Note: The section "The following patterns are considered problems:" and "The following patterns are not considered problems:" is generated using the test cases.
Note: The section "The following patterns are considered problems:" and "The following patterns are not considered problems:" is **generated automatically** using the test cases.

@@ -23,5 +23,12 @@ 'use strict';

var skipArrows = _lodash2.default.get(context, 'options[0].excludeArrowFunctions');
var excludeParameterMatch = new RegExp(_lodash2.default.get(context, 'options[0].excludeParameterMatch', 'a^'));
return function (functionNode) {
_lodash2.default.forEach(functionNode.params, function (identifierNode) {
var parameterName = (0, _utilities.getParameterName)(identifierNode, context);
if (excludeParameterMatch.test(parameterName)) {
return;
}
var typeAnnotation = _lodash2.default.get(identifierNode, 'typeAnnotation') || _lodash2.default.get(identifierNode, 'left.typeAnnotation');

@@ -39,3 +46,3 @@

data: {
name: (0, _utilities.quoteName)((0, _utilities.getParameterName)(identifierNode, context))
name: (0, _utilities.quoteName)(parameterName)
},

@@ -42,0 +49,0 @@ message: 'Missing {{name}}parameter type annotation.',

2

package.json
{
"name": "eslint-plugin-flowtype",
"description": "Flowtype linting rules for ESLint.",
"version": "2.24.0",
"version": "2.25.0",
"main": "./dist/index.js",

@@ -6,0 +6,0 @@ "repository": {

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc