@stylistic/eslint-plugin-js
Advanced tools
Comparing version 0.0.9 to 0.0.10
@@ -57,6 +57,6 @@ 'use strict'; | ||
messages: { | ||
unexpectedOpeningLinebreak: "There should be no linebreak after '['.", | ||
unexpectedClosingLinebreak: "There should be no linebreak before ']'.", | ||
missingOpeningLinebreak: "A linebreak is required after '['.", | ||
missingClosingLinebreak: "A linebreak is required before ']'.", | ||
unexpectedOpeningLinebreak: 'There should be no linebreak after \'[\'.', | ||
unexpectedClosingLinebreak: 'There should be no linebreak before \']\'.', | ||
missingOpeningLinebreak: 'A linebreak is required after \'[\'.', | ||
missingClosingLinebreak: 'A linebreak is required before \']\'.', | ||
}, | ||
@@ -63,0 +63,0 @@ }, |
@@ -51,6 +51,6 @@ 'use strict'; | ||
messages: { | ||
unexpectedSpaceAfter: "There should be no space after '{{tokenValue}}'.", | ||
unexpectedSpaceBefore: "There should be no space before '{{tokenValue}}'.", | ||
missingSpaceAfter: "A space is required after '{{tokenValue}}'.", | ||
missingSpaceBefore: "A space is required before '{{tokenValue}}'.", | ||
unexpectedSpaceAfter: 'There should be no space after \'{{tokenValue}}\'.', | ||
unexpectedSpaceBefore: 'There should be no space before \'{{tokenValue}}\'.', | ||
missingSpaceAfter: 'A space is required after \'{{tokenValue}}\'.', | ||
missingSpaceBefore: 'A space is required before \'{{tokenValue}}\'.', | ||
}, | ||
@@ -57,0 +57,0 @@ }, |
@@ -34,4 +34,4 @@ 'use strict'; | ||
messages: { | ||
missing: "Requires a space {{location}} '{{token}}'.", | ||
extra: "Unexpected space(s) {{location}} '{{token}}'.", | ||
missing: 'Requires a space {{location}} \'{{token}}\'.', | ||
extra: 'Unexpected space(s) {{location}} \'{{token}}\'.', | ||
}, | ||
@@ -38,0 +38,0 @@ }, |
@@ -47,4 +47,4 @@ 'use strict'; | ||
messages: { | ||
missing: "A space is required {{loc}} ','.", | ||
unexpected: "There should be no space {{loc}} ','.", | ||
missing: 'A space is required {{loc}} \',\'.', | ||
unexpected: 'There should be no space {{loc}} \',\'.', | ||
}, | ||
@@ -51,0 +51,0 @@ }, |
@@ -48,5 +48,5 @@ 'use strict'; | ||
messages: { | ||
unexpectedLineBeforeAndAfterComma: "Bad line breaking before and after ','.", | ||
expectedCommaFirst: "',' should be placed first.", | ||
expectedCommaLast: "',' should be placed last.", | ||
unexpectedLineBeforeAndAfterComma: 'Bad line breaking before and after \',\'.', | ||
expectedCommaFirst: '\',\' should be placed first.', | ||
expectedCommaLast: '\',\' should be placed last.', | ||
}, | ||
@@ -53,0 +53,0 @@ }, |
@@ -46,7 +46,7 @@ 'use strict'; | ||
messages: { | ||
unexpectedSpaceBefore: "There should be no space before '{{tokenValue}}'.", | ||
unexpectedSpaceAfter: "There should be no space after '{{tokenValue}}'.", | ||
unexpectedSpaceBefore: 'There should be no space before \'{{tokenValue}}\'.', | ||
unexpectedSpaceAfter: 'There should be no space after \'{{tokenValue}}\'.', | ||
missingSpaceBefore: "A space is required before '{{tokenValue}}'.", | ||
missingSpaceAfter: "A space is required after '{{tokenValue}}'.", | ||
missingSpaceBefore: 'A space is required before \'{{tokenValue}}\'.', | ||
missingSpaceAfter: 'A space is required after \'{{tokenValue}}\'.', | ||
}, | ||
@@ -53,0 +53,0 @@ }, |
@@ -54,7 +54,7 @@ 'use strict'; | ||
messages: { | ||
expectedBefore: "Expected newline before ')'.", | ||
expectedAfter: "Expected newline after '('.", | ||
expectedBefore: 'Expected newline before \')\'.', | ||
expectedAfter: 'Expected newline after \'(\'.', | ||
expectedBetween: 'Expected newline between arguments/params.', | ||
unexpectedBefore: "Unexpected newline before ')'.", | ||
unexpectedAfter: "Unexpected newline after '('.", | ||
unexpectedBefore: 'Unexpected newline before \')\'.', | ||
unexpectedAfter: 'Unexpected newline after \'(\'.', | ||
}, | ||
@@ -61,0 +61,0 @@ }, |
@@ -29,6 +29,6 @@ 'use strict'; | ||
'prefer-single': { | ||
quote: "'", | ||
quote: '\'', | ||
description: 'doublequote', | ||
convert(str) { | ||
return str.replace(/"/gu, "'") | ||
return str.replace(/"/gu, '\'') | ||
}, | ||
@@ -35,0 +35,0 @@ }, |
@@ -307,6 +307,6 @@ 'use strict'; | ||
messages: { | ||
extraKey: "Extra space after {{computed}}key '{{key}}'.", | ||
extraValue: "Extra space before value for {{computed}}key '{{key}}'.", | ||
missingKey: "Missing space after {{computed}}key '{{key}}'.", | ||
missingValue: "Missing space before value for {{computed}}key '{{key}}'.", | ||
extraKey: 'Extra space after {{computed}}key \'{{key}}\'.', | ||
extraValue: 'Extra space before value for {{computed}}key \'{{key}}\'.', | ||
missingKey: 'Missing space after {{computed}}key \'{{key}}\'.', | ||
missingValue: 'Missing space before value for {{computed}}key \'{{key}}\'.', | ||
}, | ||
@@ -313,0 +313,0 @@ }, |
@@ -624,3 +624,3 @@ 'use strict'; | ||
// To avoid conflicts with `space-infix-ops`, e.g. `a > this.b` | ||
"BinaryExpression[operator='>']": function (node) { | ||
'BinaryExpression[operator=\'>\']': function (node) { | ||
const operatorToken = sourceCode.getTokenBefore(node.right, astUtils.isNotOpeningParenToken); | ||
@@ -627,0 +627,0 @@ |
@@ -39,4 +39,4 @@ 'use strict'; | ||
messages: { | ||
expectedLF: "Expected linebreaks to be 'LF' but found 'CRLF'.", | ||
expectedCRLF: "Expected linebreaks to be 'CRLF' but found 'LF'.", | ||
expectedLF: 'Expected linebreaks to be \'LF\' but found \'CRLF\'.', | ||
expectedCRLF: 'Expected linebreaks to be \'CRLF\' but found \'LF\'.', | ||
}, | ||
@@ -43,0 +43,0 @@ }, |
@@ -42,4 +42,4 @@ 'use strict'; | ||
messages: { | ||
missing: "Missing '()' invoking a constructor.", | ||
unnecessary: "Unnecessary '()' invoking a constructor with no arguments.", | ||
missing: 'Missing \'()\' invoking a constructor.', | ||
unnecessary: 'Unnecessary \'()\' invoking a constructor with no arguments.', | ||
}, | ||
@@ -46,0 +46,0 @@ }, |
@@ -52,3 +52,3 @@ 'use strict'; | ||
messages: { | ||
multipleSpaces: "Multiple spaces found before '{{displayValue}}'.", | ||
multipleSpaces: 'Multiple spaces found before \'{{displayValue}}\'.', | ||
}, | ||
@@ -55,0 +55,0 @@ }, |
@@ -48,6 +48,6 @@ 'use strict'; | ||
messages: { | ||
requireSpaceBefore: "A space is required before '{{token}}'.", | ||
requireSpaceAfter: "A space is required after '{{token}}'.", | ||
unexpectedSpaceBefore: "There should be no space before '{{token}}'.", | ||
unexpectedSpaceAfter: "There should be no space after '{{token}}'.", | ||
requireSpaceBefore: 'A space is required before \'{{token}}\'.', | ||
requireSpaceAfter: 'A space is required after \'{{token}}\'.', | ||
unexpectedSpaceBefore: 'There should be no space before \'{{token}}\'.', | ||
unexpectedSpaceAfter: 'There should be no space after \'{{token}}\'.', | ||
}, | ||
@@ -54,0 +54,0 @@ }, |
@@ -43,3 +43,3 @@ 'use strict'; | ||
messages: { | ||
propertiesOnNewlineAll: "Object properties must go on a new line if they aren't all on the same line.", | ||
propertiesOnNewlineAll: 'Object properties must go on a new line if they aren\'t all on the same line.', | ||
propertiesOnNewline: 'Object properties must go on a new line.', | ||
@@ -46,0 +46,0 @@ }, |
@@ -52,6 +52,6 @@ 'use strict'; | ||
messages: { | ||
operatorAtBeginning: "'{{operator}}' should be placed at the beginning of the line.", | ||
operatorAtEnd: "'{{operator}}' should be placed at the end of the line.", | ||
badLinebreak: "Bad line breaking before and after '{{operator}}'.", | ||
noLinebreak: "There should be no line break before or after '{{operator}}'.", | ||
operatorAtBeginning: '\'{{operator}}\' should be placed at the beginning of the line.', | ||
operatorAtEnd: '\'{{operator}}\' should be placed at the end of the line.', | ||
badLinebreak: 'Bad line breaking before and after \'{{operator}}\'.', | ||
noLinebreak: 'There should be no line break before or after \'{{operator}}\'.', | ||
}, | ||
@@ -58,0 +58,0 @@ }, |
@@ -76,9 +76,9 @@ 'use strict'; | ||
messages: { | ||
requireQuotesDueToReservedWord: "Properties should be quoted as '{{property}}' is a reserved word.", | ||
inconsistentlyQuotedProperty: "Inconsistently quoted property '{{key}}' found.", | ||
unnecessarilyQuotedProperty: "Unnecessarily quoted property '{{property}}' found.", | ||
unquotedReservedProperty: "Unquoted reserved word '{{property}}' used as key.", | ||
unquotedNumericProperty: "Unquoted number literal '{{property}}' used as key.", | ||
unquotedPropertyFound: "Unquoted property '{{property}}' found.", | ||
redundantQuoting: "Properties shouldn't be quoted as all quotes are redundant.", | ||
requireQuotesDueToReservedWord: 'Properties should be quoted as \'{{property}}\' is a reserved word.', | ||
inconsistentlyQuotedProperty: 'Inconsistently quoted property \'{{key}}\' found.', | ||
unnecessarilyQuotedProperty: 'Unnecessarily quoted property \'{{property}}\' found.', | ||
unquotedReservedProperty: 'Unquoted reserved word \'{{property}}\' used as key.', | ||
unquotedNumericProperty: 'Unquoted number literal \'{{property}}\' used as key.', | ||
unquotedPropertyFound: 'Unquoted property \'{{property}}\' found.', | ||
redundantQuoting: 'Properties shouldn\'t be quoted as all quotes are redundant.', | ||
}, | ||
@@ -85,0 +85,0 @@ }, |
@@ -23,7 +23,7 @@ 'use strict'; | ||
quote: '"', | ||
alternateQuote: "'", | ||
alternateQuote: '\'', | ||
description: 'doublequote', | ||
}, | ||
single: { | ||
quote: "'", | ||
quote: '\'', | ||
alternateQuote: '"', | ||
@@ -30,0 +30,0 @@ description: 'singlequote', |
@@ -43,3 +43,3 @@ 'use strict'; | ||
messages: { | ||
missingSpace: "Operator '{{operator}}' must be spaced.", | ||
missingSpace: 'Operator \'{{operator}}\' must be spaced.', | ||
}, | ||
@@ -46,0 +46,0 @@ }, |
@@ -56,8 +56,8 @@ 'use strict'; | ||
messages: { | ||
unexpectedBefore: "Unexpected space before unary operator '{{operator}}'.", | ||
unexpectedAfter: "Unexpected space after unary operator '{{operator}}'.", | ||
unexpectedAfterWord: "Unexpected space after unary word operator '{{word}}'.", | ||
wordOperator: "Unary word operator '{{word}}' must be followed by whitespace.", | ||
operator: "Unary operator '{{operator}}' must be followed by whitespace.", | ||
beforeUnaryExpressions: "Space is required before unary expressions '{{token}}'.", | ||
unexpectedBefore: 'Unexpected space before unary operator \'{{operator}}\'.', | ||
unexpectedAfter: 'Unexpected space after unary operator \'{{operator}}\'.', | ||
unexpectedAfterWord: 'Unexpected space after unary word operator \'{{word}}\'.', | ||
wordOperator: 'Unary word operator \'{{word}}\' must be followed by whitespace.', | ||
operator: 'Unary operator \'{{operator}}\' must be followed by whitespace.', | ||
beforeUnaryExpressions: 'Space is required before unary expressions \'{{token}}\'.', | ||
}, | ||
@@ -64,0 +64,0 @@ }, |
@@ -227,7 +227,7 @@ 'use strict'; | ||
unexpectedSpaceAfterMarker: 'Unexpected space or tab after marker ({{refChar}}) in comment.', | ||
expectedExceptionAfter: "Expected exception block, space or tab after '{{refChar}}' in comment.", | ||
unexpectedSpaceBefore: "Unexpected space or tab before '*/' in comment.", | ||
unexpectedSpaceAfter: "Unexpected space or tab after '{{refChar}}' in comment.", | ||
expectedSpaceBefore: "Expected space or tab before '*/' in comment.", | ||
expectedSpaceAfter: "Expected space or tab after '{{refChar}}' in comment.", | ||
expectedExceptionAfter: 'Expected exception block, space or tab after \'{{refChar}}\' in comment.', | ||
unexpectedSpaceBefore: 'Unexpected space or tab before \'*/\' in comment.', | ||
unexpectedSpaceAfter: 'Unexpected space or tab after \'{{refChar}}\' in comment.', | ||
expectedSpaceBefore: 'Expected space or tab before \'*/\' in comment.', | ||
expectedSpaceAfter: 'Expected space or tab after \'{{refChar}}\' in comment.', | ||
}, | ||
@@ -234,0 +234,0 @@ }, |
@@ -37,6 +37,6 @@ 'use strict'; | ||
messages: { | ||
expectedBefore: "Expected space(s) before '}'.", | ||
expectedAfter: "Expected space(s) after '${'.", | ||
unexpectedBefore: "Unexpected space(s) before '}'.", | ||
unexpectedAfter: "Unexpected space(s) after '${'.", | ||
expectedBefore: 'Expected space(s) before \'}\'.', | ||
expectedAfter: 'Expected space(s) after \'${\'.', | ||
unexpectedBefore: 'Unexpected space(s) before \'}\'.', | ||
unexpectedAfter: 'Unexpected space(s) after \'${\'.', | ||
}, | ||
@@ -43,0 +43,0 @@ }, |
{ | ||
"name": "@stylistic/eslint-plugin-js", | ||
"version": "0.0.9", | ||
"version": "0.0.10", | ||
"author": "Anthony Fu <anthonyfu117@hotmail.com>", | ||
@@ -17,2 +17,3 @@ "license": "MIT", | ||
".": { | ||
"types": "./dts/index.d.ts", | ||
"require": "./dist/index.js" | ||
@@ -28,2 +29,3 @@ }, | ||
"main": "./dist/index.js", | ||
"types": "./dts/index.d.ts", | ||
"files": [ | ||
@@ -30,0 +32,0 @@ "dist", |
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
705720
79
18016