eslint-plugin-hyoban 0.5.2 → 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2 -2
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2,7 +2,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
2
2
|
|
|
3
3
|
var utils = require('@typescript-eslint/utils');
|
|
4
4
|
|
|
5
|
-
var version = "0.5.
|
|
5
|
+
var version = "0.5.3";
|
|
6
6
|
|
|
7
7
|
const createRule = utils.ESLintUtils.RuleCreator((name)=>`https://github.com/hyoban/eslint-plugin-hyoban/blob/main/src/${name}.ts`);
|
|
8
8
|
|
|
@@ -98,7 +98,7 @@ const rule$1 = createRule({
|
|
|
98
98
|
if (expressionTypesNoCheck.has(expression.type)) return;
|
|
99
99
|
if (expression.type === utils.AST_NODE_TYPES.ArrowFunctionExpression && expression.body.type !== utils.AST_NODE_TYPES.BlockStatement) {
|
|
100
100
|
// enforce multiple lines arrow function do not start with same line as jsx expression container
|
|
101
|
-
if (expression.loc.start.line === node.loc.start.line) {
|
|
101
|
+
if (expression.loc.start.line === node.loc.start.line && expression.body.type !== utils.AST_NODE_TYPES.JSXElement) {
|
|
102
102
|
context.report({
|
|
103
103
|
node: expression,
|
|
104
104
|
messageId: 'noExtraSpaceJsxExpression',
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ESLintUtils, AST_NODE_TYPES } from '@typescript-eslint/utils';
|
|
2
2
|
|
|
3
|
-
var version = "0.5.
|
|
3
|
+
var version = "0.5.3";
|
|
4
4
|
|
|
5
5
|
const createRule = ESLintUtils.RuleCreator((name)=>`https://github.com/hyoban/eslint-plugin-hyoban/blob/main/src/${name}.ts`);
|
|
6
6
|
|
|
@@ -96,7 +96,7 @@ const rule$1 = createRule({
|
|
|
96
96
|
if (expressionTypesNoCheck.has(expression.type)) return;
|
|
97
97
|
if (expression.type === AST_NODE_TYPES.ArrowFunctionExpression && expression.body.type !== AST_NODE_TYPES.BlockStatement) {
|
|
98
98
|
// enforce multiple lines arrow function do not start with same line as jsx expression container
|
|
99
|
-
if (expression.loc.start.line === node.loc.start.line) {
|
|
99
|
+
if (expression.loc.start.line === node.loc.start.line && expression.body.type !== AST_NODE_TYPES.JSXElement) {
|
|
100
100
|
context.report({
|
|
101
101
|
node: expression,
|
|
102
102
|
messageId: 'noExtraSpaceJsxExpression',
|