Skip to content

Commit

Permalink
Merge c8b5389 into 054e04b
Browse files Browse the repository at this point in the history
  • Loading branch information
fisker committed Mar 12, 2020
2 parents 054e04b + c8b5389 commit 5ac291b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions rules/filename-case.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ function fixFilename(words, caseFunctions, {leading, extension}) {
return combinations.map(parts => `${leading}${parts.join('')}${extension}`);
}

const leadingUnserscoresRegex = /^(?<leading>_+)(?<tailing>.*)$/;
const leadingUnderscoresRegex = /^(?<leading>_+)(?<tailing>.*)$/;
function splitFilename(filename) {
const result = leadingUnserscoresRegex.exec(filename) || {groups: {}};
const result = leadingUnderscoresRegex.exec(filename) || {groups: {}};
const {leading = '', tailing = filename} = result.groups;

const words = [];
Expand Down
4 changes: 2 additions & 2 deletions rules/no-nested-ternary.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';
const getDocumentationUrl = require('./utils/get-documentation-url');

const isParethesized = (sourceCode, node) => {
const isParenthesized = (sourceCode, node) => {
const previousToken = sourceCode.getTokenBefore(node);
const nextToken = sourceCode.getTokenAfter(node);

Expand Down Expand Up @@ -35,7 +35,7 @@ const create = context => {
) {
context.report({node, message});
break;
} else if (!isParethesized(sourceCode, childNode)) {
} else if (!isParenthesized(sourceCode, childNode)) {
context.report({
node: childNode,
message,
Expand Down
2 changes: 1 addition & 1 deletion rules/utils/avoid-capture.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Useful when you want to rename a variable (or create a new variable) while being
@param {Scope[]} scopes - The list of scopes the new variable will be referenced in.
@param {number} ecmaVersion - The language version, get it from `context.parserOptions.ecmaVersion`.
@param {isSafe} [isSafe] - Rule-specific name check function.
@returns {string} - Either `name` as is, or a string like `${name}_` suffixed with undescores to make the name unique.
@returns {string} - Either `name` as is, or a string like `${name}_` suffixed with underscores to make the name unique.
*/
module.exports = (name, scopes, ecmaVersion, isSafe = alwaysTrue) => {
const isStrict = someScopeIsStrict(scopes);
Expand Down

0 comments on commit 5ac291b

Please sign in to comment.