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 1.1.0 to 1.1.1-alpha-0

dist/rules/noFlowSuppressionsInStrictFiles.js

4

dist/index.js

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

var _noFlowFixMeInStrictFiles = _interopRequireDefault(require("./rules/noFlowFixMeInStrictFiles"));
var _noFlowSuppressionsInStrictFiles = _interopRequireDefault(require("./rules/noFlowSuppressionsInStrictFiles"));

@@ -131,3 +131,3 @@ var _noInternalFlowType = _interopRequireDefault(require("./rules/noInternalFlowType"));

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

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

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

}
} else if (always && !_lodash.default.get(context, 'settings.flowtype.onlyFilesWithFlowAnnotation')) {
} else if (always && !_lodash.default.get(context, 'settings[\'ft-flow\'].onlyFilesWithFlowAnnotation')) {
context.report({

@@ -111,0 +111,0 @@ fix: fixer => {

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

const create = context => {
const checkThisFile = !_lodash.default.get(context, 'settings.flowtype.onlyFilesWithFlowAnnotation') || (0, _utilities.isFlowFile)(context);
const checkThisFile = !_lodash.default.get(context, 'settings[\'ft-flow\'].onlyFilesWithFlowAnnotation') || (0, _utilities.isFlowFile)(context);

@@ -43,0 +43,0 @@ if (!checkThisFile) {

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

var _default = (cb, context) => {
const checkThisFile = !_lodash.default.get(context, 'settings.flowtype.onlyFilesWithFlowAnnotation') && !(0, _isNoFlowFile.default)(context) || (0, _isFlowFile.default)(context); // eslint-disable-line no-extra-parens, max-len
const checkThisFile = !_lodash.default.get(context, 'settings[\'ft-flow\'].onlyFilesWithFlowAnnotation') && !(0, _isNoFlowFile.default)(context) || (0, _isFlowFile.default)(context); // eslint-disable-line no-extra-parens, max-len

@@ -20,0 +20,0 @@ if (!checkThisFile) {

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

/**
* This is used to pull the definition of a builtin rule from eslint.
*
* Adopted from https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/rules/utils/get-builtin-rule.js.

@@ -15,14 +17,22 @@ */

const eslintVersion = require('eslint/package.json').version;
/* istanbul ignore next */
if (eslintVersion.startsWith('7.')) {
return require(`eslint/lib/rules/${id}`);
} // TODO: This whole file and area should be looked at
// eslint-disable-next-line import/no-unresolved
} // In eslint 8 and beyond using https://nodejs.org/api/packages.html#subpath-exports
// eslint has defined public exported paths and has locked the rest of the
// directory as private.
//
// Though there is an issue when run with `jest` apparently where it does not support ESM.
// So we're gonna do it the same old fashion way if it crashes when requiring.
// ref: https://github.com/typescript-eslint/typescript-eslint/issues/4210#issuecomment-981203332
return require('eslint/use-at-your-own-risk').builtinRules.get(id);
try {
// eslint-disable-next-line import/no-unresolved
return require('eslint/use-at-your-own-risk').builtinRules.get(id);
} catch (e) {
return require(`eslint/lib/rules/${id}`);
}
};
exports.getBuiltinRule = getBuiltinRule;
{
"name": "eslint-plugin-ft-flow",
"description": "Flowtype linting rules for ESLint by flow-typed",
"version": "1.1.0",
"version": "1.1.1-alpha-0",
"license": "MIT",

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

"check-tests": "babel-node ./scripts/checkTests",
"create-readme": "gitdown ./.README/README.md --output-file ./README.md && npm run documentation-add-assertions",
"documentation-add-assertions": "babel-node ./scripts/addAssertions",
"create-readme": "node ./scripts/genReadme && babel-node ./scripts/addAssertions",
"lint": "eslint ./src ./tests",
"test": "mocha --require @babel/register ./tests/rules/index.js",
"prepublishOnly": "yarn documentation-add-assertions && yarn build"
"prepublishOnly": "yarn create-readme && yarn build"
},

@@ -35,3 +34,3 @@ "dependencies": {

"@babel/plugin-syntax-flow": "^7.16.5",
"@babel/plugin-syntax-jsx": "^7.16.0",
"@babel/plugin-syntax-jsx": "^7.16.5",
"@babel/plugin-transform-react-jsx": "^7.16.5",

@@ -47,14 +46,11 @@ "@babel/preset-env": "^7.16.5",

"eslint-config-bzc": "^1.0.5",
"eslint-config-canonical": "^32.15.0",
"eslint-plugin-eslint-plugin": "^4.0.2",
"eslint-plugin-fb-flow": "^0.0.4",
"eslint-plugin-ft-flow": "^1.0.1",
"eslint-plugin-ft-flow": "^1.1.0",
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-jest": "^25.3.0",
"eslint-plugin-jest": "^25.3.2",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-react": "^7.27.1",
"eslint-plugin-react": "^7.28.0",
"eslint-plugin-react-hooks": "^4.3.0",
"eslint-plugin-testing-library": "^5.0.1",
"flow-bin": "^0.167.1",
"gitdown": "^3.1.4",
"glob": "^7.2.0",

@@ -61,0 +57,0 @@ "husky": "^7.0.4",

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