Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint-plugin-ft-flow

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-ft-flow - npm Package Compare versions

Comparing version 0.1.2 to 1.0.0

dist/rules/enforceSuppressionCode.js

2

dist/bin/checkDocs.js

@@ -82,3 +82,3 @@ #!/usr/bin/env node

const invalidList = invalid.map(names => names[0]).join(', ');
throw new Error(`Docs checker encountered an error in: ${invalidList}. ` + 'Make sure that for every rule you created documentation file with assertions placeholder in camelCase ' + 'and included the file path in `.README/README.md` file.');
throw new Error(`Docs checker encountered an error in: ${invalidList}. Make sure that for every rule you created documentation file with assertions placeholder in camelCase and included the file path in \`.README/README.md\` file.`);
}

@@ -85,0 +85,0 @@ };

@@ -26,2 +26,4 @@ "use strict";

var _enforceSuppressionCode = _interopRequireDefault(require("./rules/enforceSuppressionCode"));
var _genericSpacing = _interopRequireDefault(require("./rules/genericSpacing"));

@@ -41,2 +43,4 @@

var _noFlowFixMeInStrictFiles = _interopRequireDefault(require("./rules/noFlowFixMeInStrictFiles"));
var _noInternalFlowType = _interopRequireDefault(require("./rules/noInternalFlowType"));

@@ -120,2 +124,3 @@

'enforce-line-break': _enforceLineBreak.default,
'enforce-suppression-code': _enforceSuppressionCode.default,
'generic-spacing': _genericSpacing.default,

@@ -128,2 +133,3 @@ 'interface-id-match': _interfaceIdMatch.default,

'no-flow-fix-me-comments': _noFlowFixMeComments.default,
'no-flow-fix-me-in-strict-files': _noFlowFixMeInStrictFiles.default,
'no-internal-flow-type': _noInternalFlowType.default,

@@ -130,0 +136,0 @@ 'no-mixed': _noMixed.default,

@@ -77,3 +77,3 @@ "use strict";

const isMethod = functionNode.parent && functionNode.parent.type === 'MethodDefinition';
const propertyNodes = ['Property', 'ClassProperty'];
const propertyNodes = ['Property', 'ClassProperty', 'PropertyDefinition'];
const isProperty = functionNode.parent && propertyNodes.includes(functionNode.parent.type);

@@ -80,0 +80,0 @@ let selector;

@@ -12,5 +12,3 @@ "use strict";

const isSemicolon = token => {
return token.type === 'Punctuator' && token.value === ';';
};
const isSemicolon = token => token.type === 'Punctuator' && token.value === ';';

@@ -33,5 +31,3 @@ const create = context => {

fix = fixer => {
return fixer.insertTextAfter(lastToken, ';');
};
fix = fixer => fixer.insertTextAfter(lastToken, ';');
} else {

@@ -41,5 +37,3 @@ message = 'Extra semicolon.';

fix = fixer => {
return fixer.remove(lastToken);
};
fix = fixer => fixer.remove(lastToken);
}

@@ -72,3 +66,3 @@

TypeAnnotation: node => {
if (node.parent.type === 'ClassProperty') {
if (['PropertyDefinition', 'ClassProperty'].includes(node.parent.type)) {
checkForSemicolon(node.parent);

@@ -75,0 +69,0 @@ }

@@ -17,7 +17,5 @@ "use strict";

const create = context => {
return (0, _typeColonSpacing.default)('before', context, {
always: context.options[0] === 'always'
});
};
const create = context => (0, _typeColonSpacing.default)('before', context, {
always: context.options[0] === 'always'
});

@@ -24,0 +22,0 @@ var _default = {

@@ -28,2 +28,3 @@ "use strict";

ClassProperty: (0, _evaluateTypical.default)(context, report, 'class property'),
PropertyDefinition: (0, _evaluateTypical.default)(context, report, 'class property'),
ObjectTypeIndexer: (0, _evaluateObjectTypeIndexer.default)(context, report),

@@ -30,0 +31,0 @@ ObjectTypeProperty: (0, _evaluateObjectTypeProperty.default)(context, report),

@@ -67,2 +67,8 @@ "use strict";

exports.spacingFixers = void 0;
Object.defineProperty(exports, "suppressionTypes", {
enumerable: true,
get: function () {
return _suppressionTypes.default;
}
});

@@ -93,2 +99,4 @@ var spacingFixers = _interopRequireWildcard(require("./spacingFixers"));

var _suppressionTypes = _interopRequireDefault(require("./suppressionTypes"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -95,0 +103,0 @@

{
"name": "eslint-plugin-ft-flow",
"description": "Flowtype linting rules for ESLint by flow-typed",
"version": "0.1.2",
"version": "1.0.0",
"license": "MIT",

@@ -6,0 +6,0 @@ "main": "./dist/index.js",

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