Skip to content

Commit

Permalink
chore(dev): update devDeps & add eslint-plugin-unicorn
Browse files Browse the repository at this point in the history
  • Loading branch information
STRML committed Dec 17, 2021
1 parent f43802a commit 24c245d
Show file tree
Hide file tree
Showing 5 changed files with 1,149 additions and 999 deletions.
35 changes: 24 additions & 11 deletions .eslintrc.json
Expand Up @@ -3,23 +3,36 @@
"parser": "@babel/eslint-parser",
"plugins": [
"react",
"flowtype"
"flowtype",
"unicorn"
],
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:flowtype/recommended"
],
"rules": {
"no-console": 0,
"no-use-before-define": [2, "nofunc"],
"no-unused-vars": [1, {
"argsIgnorePattern": "^(e|_.*)$",
"vars": "local",
"varsIgnorePattern": "(debug|^_)"
}],
"prefer-const": 2,
"react/jsx-boolean-value": [2, "always"]
"no-console": "off",
"no-use-before-define": [
"error",
"nofunc"
],
"no-unused-vars": [
"warn",
{
"argsIgnorePattern": "^(e|_.*)$",
"vars": "local",
"varsIgnorePattern": "(debug|^_)"
}
],
"prefer-const": "error",
"react/jsx-boolean-value": [
"error",
"always"
],
"unicorn/better-regex": "warn",
"unicorn/expiring-todo-comments": "error",
"unicorn/no-abusive-eslint-disable": "error"
},
"env": {
"browser": true,
Expand All @@ -31,4 +44,4 @@
"version": "detect"
}
}
}
}
2 changes: 1 addition & 1 deletion lib/utils.js
Expand Up @@ -705,7 +705,7 @@ export function synchronizeLayoutWithChildren(
} else {
if (!isProduction && child.props._grid) {
console.warn(
"`_grid` properties on children have been deprecated as of React 15.2. " + // eslint-disable-line
"`_grid` properties on children have been deprecated as of React 15.2. " +
"Please use `data-grid` or add your properties directly to the `layout`."
);
}
Expand Down
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -64,6 +64,7 @@
"eslint-plugin-flowtype": "^5.9.0",
"eslint-plugin-mocha": "^9.0.0",
"eslint-plugin-react": "^7.24.0",
"eslint-plugin-unicorn": "^39.0.0",
"exports-loader": "^3.0.0",
"flow-bin": "^0.158.0",
"husky": "^7.0.2",
Expand Down
2 changes: 1 addition & 1 deletion test/spec/utils-test.js
Expand Up @@ -80,7 +80,7 @@ describe("validateLayout", () => {
// $FlowFixMe: dynamic check
{ i: "2", x: 1, y: 2, w: 1 }
]);
}).toThrowError(/layout\[1\]\.h must be a number!/i);
}).toThrowError(/layout\[1]\.h must be a number!/i);
});
});

Expand Down

0 comments on commit 24c245d

Please sign in to comment.