Skip to content

Commit

Permalink
Bug 1553926 - Add fetch-options eslint plugin to mozilla central r=St…
Browse files Browse the repository at this point in the history
…andard8

Differential Revision: https://phabricator.services.mozilla.com/D32723

--HG--
extra : moz-landing-system : lando
  • Loading branch information
piatra committed Jun 6, 2019
1 parent a8747fe commit 6c4e640
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 21 deletions.
6 changes: 3 additions & 3 deletions browser/components/newtab/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ module.exports = {
"plugins": [
"import", // require("eslint-plugin-import")
"react", // require("eslint-plugin-react")
"jsx-a11y" // require("eslint-plugin-jsx-a11y")
"jsx-a11y", // require("eslint-plugin-jsx-a11y")

// Temporarily disabled since they aren't vendored into in mozilla central yet
// "react-hooks", // require("react-hooks")
// "fetch-options", // require("eslint-plugin-fetch-options")
"fetch-options", // require("eslint-plugin-fetch-options")
],
"settings": {
"react": {
Expand Down Expand Up @@ -68,7 +68,7 @@ module.exports = {
"rules": {
// "react-hooks/rules-of-hooks": 2,

// "fetch-options/no-fetch-credentials": 2,
"fetch-options/no-fetch-credentials": 2,

"react/jsx-boolean-value": [2, "always"],
"react/jsx-closing-bracket-location": [2, "after-props"],
Expand Down
38 changes: 22 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"eslint-plugin-mozilla": "file:tools/lint/eslint/eslint-plugin-mozilla",
"eslint-plugin-no-unsanitized": "3.0.2",
"eslint-plugin-prettier": "3.0.1",
"eslint-plugin-fetch-options": "0.0.5",
"eslint-plugin-react": "7.12.4",
"eslint-plugin-spidermonkey-js": "file:tools/lint/eslint/eslint-plugin-spidermonkey-js",
"prettier": "1.17.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ module.exports = {

// When adding items to this file please check for effects on sub-directories.
"plugins": [
"fetch-options",
"mozilla",
"no-unsanitized",
],
Expand Down Expand Up @@ -134,6 +135,10 @@ module.exports = {
// Always require a trailing EOL
"eol-last": "error",

// XXX This rule should be enabled, see Bug 1557040
// No credentials submitted with fetch calls
"fetch-options/no-fetch-credentials": "off",

// No spaces between function name and parentheses
"func-call-spacing": "error",

Expand Down
4 changes: 2 additions & 2 deletions tools/lint/eslint/manifest.tt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"visibility": "public",
"filename": "eslint.tar.gz",
"unpack": true,
"digest": "22cfcfd566879b68dbc972a7b503b56c5ec1a923e5727d874ff94135ebeb0619494f5b08b060168c6068cf6504de6dbdf098b51f04610db88065dc2fa966cb74",
"size": 7372571
"digest": "d1312d75280e492e0e31b1d76ae819530eb15a089b68bfdeb7c1a21605f76bded4b2d1a04243d24a74471ac0cf4c422756cb34d920f6294e9c19826f7d74a846",
"size": 7375917
}
]

0 comments on commit 6c4e640

Please sign in to comment.