eslint-plugin-hash-exempt
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -12,4 +12,2 @@ #!/usr/bin/env node | ||
require("source-map-support/register"); | ||
var _fs = _interopRequireDefault(require("fs")); | ||
@@ -25,23 +23,41 @@ | ||
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } | ||
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } | ||
const readFile = (0, _util.promisify)(_fs.default.readFile); | ||
const writeFile = (0, _util.promisify)(_fs.default.writeFile); | ||
async function processFile(fileName) { | ||
const cli = new _eslint.CLIEngine(); | ||
const linter = new _eslint.Linter(); | ||
const raw = await readFile(fileName, 'utf-8'); | ||
const config = cli.getConfigForFile(fileName); | ||
linter.verify(raw, config); | ||
const source = linter.getSourceCode(); | ||
const hu = new _hashUtil.default(raw, source.ast); | ||
const updated = hu.updateHashDirective(); | ||
await writeFile(fileName, updated, 'utf-8'); | ||
function processFile(_x) { | ||
return _processFile.apply(this, arguments); | ||
} | ||
function _processFile() { | ||
_processFile = _asyncToGenerator(function* (fileName) { | ||
const cli = new _eslint.CLIEngine(); | ||
const linter = new _eslint.Linter(); | ||
const raw = yield readFile(fileName, 'utf-8'); | ||
const config = cli.getConfigForFile(fileName); | ||
linter.verify(raw, config); | ||
const source = linter.getSourceCode(); | ||
const hu = new _hashUtil.default(raw, source.ast); | ||
const updated = hu.updateHashDirective(); | ||
yield writeFile(fileName, updated, 'utf-8'); | ||
}); | ||
return _processFile.apply(this, arguments); | ||
} | ||
; // istanbul ignore next | ||
async function processFiles(fileNames) { | ||
return Promise.all(fileNames.map(processFile)); | ||
function processFiles(_x2) { | ||
return _processFiles.apply(this, arguments); | ||
} | ||
function _processFiles() { | ||
_processFiles = _asyncToGenerator(function* (fileNames) { | ||
return Promise.all(fileNames.map(processFile)); | ||
}); | ||
return _processFiles.apply(this, arguments); | ||
} | ||
; // istanbul ignore next | ||
@@ -71,2 +87,2 @@ | ||
} | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9iaW4vaGFzaC1leGVtcHQuanMiXSwibmFtZXMiOlsicmVhZEZpbGUiLCJmcyIsIndyaXRlRmlsZSIsInByb2Nlc3NGaWxlIiwiZmlsZU5hbWUiLCJjbGkiLCJDTElFbmdpbmUiLCJsaW50ZXIiLCJMaW50ZXIiLCJyYXciLCJjb25maWciLCJnZXRDb25maWdGb3JGaWxlIiwidmVyaWZ5Iiwic291cmNlIiwiZ2V0U291cmNlQ29kZSIsImh1IiwiSGFzaFV0aWwiLCJhc3QiLCJ1cGRhdGVkIiwidXBkYXRlSGFzaERpcmVjdGl2ZSIsInByb2Nlc3NGaWxlcyIsImZpbGVOYW1lcyIsIlByb21pc2UiLCJhbGwiLCJtYXAiLCJwcm9jZXNzIiwiYXJndiIsImVuZHNXaXRoIiwic2hpZnQiLCJhbGxGaWxlcyIsImluY2x1ZGVzIiwicmVwb3J0IiwiZXhlY3V0ZU9uRmlsZXMiLCJmaWxlcyIsInJlc3VsdHMiLCJyIiwiZXJyb3JDb3VudCIsImZpbGVQYXRoIiwiZmlsdGVyIiwibGVuZ3RoIiwiY29uc29sZSIsImVycm9yIiwiY2F0Y2giLCJlcnIiLCJkaXIiLCJjb2xvcnMiXSwibWFwcGluZ3MiOiJBQUFBOztBQUNBOzs7Ozs7Ozs7QUFDQTs7QUFFQTs7QUFDQTs7QUFFQTs7QUFFQTs7OztBQUVBLE1BQU1BLFFBQVEsR0FBRyxxQkFBVUMsWUFBR0QsUUFBYixDQUFqQjtBQUNBLE1BQU1FL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LmZpbHRlcihyID0+IHIpO1xuXG5cdGlmICghZmlsZXMubGVuZ3RoKSB7XG5cdFx0aWYgKGFsbEZpbGVzKSB7XG5cdFx0XHRjb25zb2xlLmVycm9yKCdObyBtYXRjaGluZyBmaWxlcyB3ZXJlIHNwZWNpZmllZC4uLicpO1xuXHRcdH0gZWxzZSB7XG5cdFx0XHRjb25zb2xlLmVycm9yKCdObyBsaW50IHZpb2xhdGlvbnMgZm91bmQsIG5vIGV4ZW1wdGlvbnMgY3JlYXRlZC4nKTtcblx0XHR9XG5cdH1cblxuXHRwcm9jZXNzRmlsZXMoZmlsZXMpLmNhdGNoKGVyciA9PiBjb25zb2xlLmRpcihlcnIsIHsgY29sb3JzOiB0cnVlIH0pKTtcbn1cbiJdfQ== |
@@ -12,2 +12,10 @@ "use strict"; | ||
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } | ||
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } | ||
function _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } | ||
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } | ||
const disableRegex = /^\s*eslint-disable(?:\s|$)(.*)/; | ||
@@ -24,4 +32,9 @@ const hashRegex = /--([a-f0-9]+)--/; | ||
privStore.set(this, priv); | ||
[this.firstDisable] = this.getDisableDirectives(); | ||
var _this$getDisableDirec = this.getDisableDirectives(); | ||
var _this$getDisableDirec2 = _slicedToArray(_this$getDisableDirec, 1); | ||
this.firstDisable = _this$getDisableDirec2[0]; | ||
if (this.firstDisable && this.firstDisable.loc.start.line === 1) { | ||
@@ -35,3 +48,6 @@ this.hashBase = code.replace(`/*${this.firstDisable.value}*/`, ''); | ||
static getHashFromDirective(directive) { | ||
const [full, args] = disableRegex.exec(directive); | ||
const _disableRegex$exec = disableRegex.exec(directive), | ||
_disableRegex$exec2 = _slicedToArray(_disableRegex$exec, 2), | ||
full = _disableRegex$exec2[0], | ||
args = _disableRegex$exec2[1]; | ||
@@ -78,3 +94,3 @@ if (full && args) { | ||
updateHashDirective() { | ||
const priv = privStore.get(this); // console.dir(this.firstDisable, { colors: true, depth: 5 }); | ||
const priv = privStore.get(this); | ||
@@ -98,3 +114,5 @@ if (!this.firstDisable || this.firstDisable.loc.start.line !== 1) { | ||
const [, args] = disableRegex.exec(directive); | ||
const _disableRegex$exec3 = disableRegex.exec(directive), | ||
_disableRegex$exec4 = _slicedToArray(_disableRegex$exec3, 2), | ||
args = _disableRegex$exec4[1]; | ||
@@ -111,2 +129,2 @@ if (args) { | ||
exports.default = HashUtil; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9saWIvaGFzaC11dGlsLmpzIl0sIm5hbWVzIjpbImRpc2FibGVSZWdleCIsImhhc2hSZWdleCIsInByaXZTdG9yZSIsIldlYWtNYXAiLCJIYXNoVXRpbCIsImNvbnN0cnVjdG9yIiwiY29kZSIsImFzdCIsInByaXYiLCJyYXciLCJzZXQiLCJmaXJzdERpc2FibGUiLCJnZXREaXNhYmxlRGlyZWN0aXZlcyIsImxvYyIsInN0YXJ0IiwibGluZSIsImhhc2hCYXNlIiwicmVwbGFjZSIsInZhbHVlIiwiZ2V0SGFzaEZyb21EaXJlY3RpdmUiLCJkaXJlY3RpdmUiLCJmdWxsIiwiYXJncyIsImV4ZWMiLCJtYXRjaCIsImxlbmd0aCIsInVuZGVmaW5lZCIsImdldFN0cmluZ0hhc2giLCJ0ZXh0IiwiY3J5cHRvIiwiY3JlYXRlSGFzaCIsInVwZGF0ZSIsImRpZ2VzdCIsImdldENvbW1l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ke2NvZGVIYXNofS0tYCk7XG5cdFx0XHRyZXR1cm4gcHJpdi5yYXcucmVwbGFjZShkaXJlY3RpdmUsIHVwZGF0ZWREaXJlY3RpdmUpO1xuXHRcdH1cblxuXHRcdGNvbnN0IFssIGFyZ3NdID0gZGlzYWJsZVJlZ2V4LmV4ZWMoZGlyZWN0aXZlKTtcblx0XHRpZiAoYXJncykge1xuXHRcdFx0cmV0dXJuIHByaXYucmF3LnJlcGxhY2UoZGlyZWN0aXZlLCBgIGVzbGludC1kaXNhYmxlICR7YXJnc30sIC0tJHtjb2RlSGFzaH0tLSBgKTtcblx0XHR9XG5cblx0XHRyZXR1cm4gcHJpdi5yYXcucmVwbGFjZShkaXJlY3RpdmUsIGAgZXNsaW50LWRpc2FibGUgLS0ke2NvZGVIYXNofS0tIGApO1xuXHR9XG59XG4iXX0= |
@@ -7,3 +7,10 @@ "use strict"; | ||
// import { hasDisable, getDirectiveHash, getTextHash } from '../lib/hashes'; | ||
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } | ||
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } | ||
function _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } | ||
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } | ||
const getDocsUrl = () => undefined; | ||
@@ -31,5 +38,5 @@ | ||
} else { | ||
const [{ | ||
hashRequired = false | ||
}] = context.options; | ||
const _context$options = _slicedToArray(context.options, 1), | ||
_context$options$0$ha = _context$options[0].hashRequired, | ||
hashRequired = _context$options$0$ha === void 0 ? false : _context$options$0$ha; | ||
@@ -61,2 +68,2 @@ if (hashRequ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lcnRpZXM6IHtcblx0XHRcdHJlcXVpcmVIYXNoOiB7XG5cdFx0XHRcdHR5cGU6ICdib29sZWFuJ1xuXHRcdFx0fVxuXHRcdH1cblx0fVxuXTtcblxubW9kdWxlLmV4cG9ydHMgPSB7XG5cdGNyZWF0ZSxcblx0bWV0YToge1xuXHRcdHNjaGVtYSxcblx0XHRkb2NzOiB7XG5cdFx0XHR1cmw6IGdldERvY3NVcmwoX19maWxlbmFtZSlcblx0XHR9LFxuXHRcdGZpeGFibGU6ICdjb2RlJ1xuXHR9XG59O1xuIl19 |
{ | ||
"name": "eslint-plugin-hash-exempt", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "ESlint rules to require/verify file hashes for disable directives", | ||
@@ -26,3 +26,3 @@ "license": "MIT", | ||
"bin": { | ||
"hash-exempt": "./dist/hash-exempt.js" | ||
"hash-exempt": "./dist/bin/hash-exempt.js" | ||
}, | ||
@@ -48,6 +48,3 @@ "devDependencies": { | ||
"eslint": ">=4" | ||
}, | ||
"dependencies": { | ||
"source-map-support": "^0.5.9" | ||
} | ||
} |
# eslint-plugin-hash-exempt | ||
This plugin supports exempting a file from linting based on a hash of its contents. This is useful | ||
fgor legacy code, or in cases where you may want to apply conflicting eslint standards to files from | ||
for legacy code, or in cases where you may want to apply conflicting eslint standards to files from | ||
a scaffold or generator. | ||
@@ -15,3 +15,3 @@ | ||
``` | ||
```sh | ||
npm install --save-dev eslint-plugin-hash-exempt | ||
@@ -38,4 +38,5 @@ ``` | ||
### Options | ||
* **`hashRequired`**: If this is false, only files that have a directive with hash will be verified. | ||
If it's true, any files with a directive at the top will require a hash. | ||
* **`hashRequired`**: If this is `false`, only files that have a directive with hash will be | ||
verified. If it's `true`, any files with a directive at the top will require a hash. This is | ||
`false` by default. | ||
@@ -42,0 +43,0 @@ ## Hash Creation |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
31333
1
233
55
- Removedsource-map-support@^0.5.9
- Removedbuffer-from@1.1.2(transitive)
- Removedsource-map@0.6.1(transitive)
- Removedsource-map-support@0.5.21(transitive)