1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-01-19 14:27:07 +01:00
slate/.eslintrc
Dominic Amato 3dce916074 Use strict equality except for null/undefined for improved performance and behavior (#2514)
* Convert Non-strict to strict equality checking
Convert non-strict equality checking, using `==`, to the strict version, using `===`.

* Convert Non-strict to strict equality checking
Convert non-strict equality checking, using `==`, to the strict version, using `===`.

* Convert Non-strict to strict equality checking
Convert non-strict equality checking, using `==`, to the strict version, using `===`.

* Convert Non-strict to strict equality checking
Convert non-strict equality checking, using `==`, to the strict version, using `===`.

* Convert Non-strict to strict equality checking
Convert non-strict equality checking, using `==`, to the strict version, using `===`.

* Convert Non-strict to strict equality checking
Convert non-strict equality checking, using `==`, to the strict version, using `===`.

* Convert Non-strict to strict equality checking
Convert non-strict equality checking, using `==`, to the strict version, using `===`.

* Convert Non-strict to strict equality checking
Convert non-strict equality checking, using `==`, to the strict version, using `===`.

* Convert Non-strict to strict equality checking
Convert non-strict equality checking, using `==`, to the strict version, using `===`.

* Convert Non-strict to strict equality checking
Convert non-strict equality checking, using `==`, to the strict version, using `===`.

* Convert Non-strict to strict equality checking
Convert non-strict equality checking, using `==`, to the strict version, using `===`.

* Convert Non-strict to strict equality checking
Convert non-strict equality checking, using `==`, to the strict version, using `===`.

* Convert Non-strict to strict equality checking
Convert non-strict equality checking, using `==`, to the strict version, using `===`.

* Convert Non-strict to strict equality checking
Convert non-strict equality checking, using `==`, to the strict version, using `===`.

* Convert Non-strict to strict equality checking
Convert non-strict equality checking, using `==`, to the strict version, using `===`.

* Convert Non-strict to strict equality checking
Convert non-strict equality checking, using `==`, to the strict version, using `===`.

* Convert Non-strict to strict equality checking
Convert non-strict equality checking, using `==`, to the strict version, using `===`.

* Convert Non-strict to strict equality checking
Convert non-strict equality checking, using `==`, to the strict version, using `===`.

* Convert Non-strict to strict equality checking
Convert non-strict equality checking, using `==`, to the strict version, using `===`.

* Convert Non-strict to strict equality checking
Convert non-strict equality checking, using `==`, to the strict version, using `===`.

* Convert Non-strict to strict equality checking
Convert non-strict equality checking, using `==`, to the strict version, using `===`.

* Convert Non-strict to strict equality checking
Convert non-strict equality checking, using `==`, to the strict version, using `===`.

* Convert Non-strict to strict equality checking
Convert non-strict equality checking, using `==`, to the strict version, using `===`.

* Convert Non-strict to strict equality checking
Convert non-strict equality checking, using `==`, to the strict version, using `===`.

* Convert Non-strict to strict equality checking
Convert non-strict equality checking, using `==`, to the strict version, using `===`.

* Convert Non-strict to strict equality checking
Convert non-strict equality checking, using `==`, to the strict version, using `===`.

* Convert Non-strict to strict equality checking
Convert non-strict equality checking, using `==`, to the strict version, using `===`.

* Convert Non-strict to strict equality checking
Convert non-strict equality checking, using `==`, to the strict version, using `===`.

* Convert Non-strict to strict equality checking
Convert non-strict equality checking, using `==`, to the strict version, using `===`.

* Convert Non-strict to strict equality checking
Convert non-strict equality checking, using `==`, to the strict version, using `===`.

* Convert Non-strict to strict equality checking
Convert non-strict equality checking, using `==`, to the strict version, using `===`.

* Convert Non-strict to strict equality checking
Convert non-strict equality checking, using `==`, to the strict version, using `===`.

* Convert Non-strict to strict equality checking
Convert non-strict equality checking, using `==`, to the strict version, using `===`.

* Convert Non-strict to strict equality checking
Convert non-strict equality checking, using `==`, to the strict version, using `===`.

* Convert Non-strict to strict equality checking
Convert non-strict equality checking, using `==`, to the strict version, using `===`.

* Convert Non-strict to strict equality checking
Convert non-strict equality checking, using `==`, to the strict version, using `===`.

* Convert Non-strict to strict equality checking
Convert non-strict equality checking, using `==`, to the strict version, using `===`.

* Convert Non-strict to strict equality checking
Convert non-strict equality checking, using `==`, to the strict version, using `===`.

* Convert Non-strict to strict equality checking
Convert non-strict equality checking, using `==`, to the strict version, using `===`.

* Convert Non-strict to strict equality checking
Convert non-strict equality checking, using `==`, to the strict version, using `===`.

* undo strict null checking

* remove added semicolons

* Prettier Formatting Changes

* Update .eslintrc

add smart strict equality rule

* Convert Non-strict to strict equality checking
Convert non-strict equality checking, using `==`, to the strict version, using `===`.

* Convert Non-strict to strict equality checking
Convert non-strict equality checking, using `==`, to the strict version, using `===`.

* Convert Non-strict to strict equality checking
Convert non-strict equality checking, using `==`, to the strict version, using `===`.

* Convert Non-strict to strict equality checking
Convert non-strict equality checking, using `==`, to the strict version, using `===`.

* Convert files to use strict equality

* fix prettier eslint errors

* fix remaining prettier complaints

* use strict null equality in serializer
2019-03-06 16:48:41 -05:00

170 lines
5.2 KiB
Plaintext

{
"extends": ["prettier", "prettier/react"],
"plugins": ["import", "react", "prettier"],
"settings": {
"import/extensions": [".js"]
},
"parser": "babel-eslint",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
}
},
"env": {
"browser": true,
"es6": true,
"mocha": true,
"node": true
},
"rules": {
"constructor-super": "error",
"dot-notation": ["error", { "allowKeywords": true }],
"eqeqeq": ["error", "smart"],
"import/default": "error",
"import/export": "error",
"import/first": "error",
"import/named": "error",
"import/namespace": "error",
"import/newline-after-import": "error",
"import/no-deprecated": "error",
"import/no-extraneous-dependencies": [
"error",
{ "peerDependencies": true }
],
"import/no-mutable-exports": "error",
"import/no-named-as-default": "error",
"import/no-named-as-default-member": "error",
"import/no-unresolved": "error",
"linebreak-style": "error",
"lines-around-comment": [
"error",
{
"beforeBlockComment": true,
"afterBlockComment": true,
"allowBlockStart": true,
"allowObjectStart": true,
"allowArrayStart": true
}
],
"no-array-constructor": "error",
"no-class-assign": "error",
"no-console": "error",
"no-const-assign": "error",
"no-debugger": "error",
"no-dupe-args": "error",
"no-dupe-class-members": "error",
"no-dupe-keys": "error",
"no-duplicate-case": "error",
"no-empty": "error",
"no-empty-character-class": "error",
"no-empty-pattern": "error",
"no-ex-assign": "error",
"no-extend-native": "error",
"no-extra-boolean-cast": "error",
"no-func-assign": "error",
"no-invalid-regexp": "error",
"no-lonely-if": "error",
"no-native-reassign": "error",
"no-negated-in-lhs": "error",
"no-new-object": "error",
"no-new-symbol": "error",
"no-path-concat": "error",
"no-redeclare": "error",
"no-regex-spaces": "error",
"no-restricted-globals": [
"error",
"Debug",
"document",
"Document",
"event",
"history",
"History",
"length",
"Map",
"Node",
"parent",
"Range",
"Selection",
"Set",
"Text"
],
"no-sequences": "error",
"no-shadow": "error",
"no-shadow-restricted-names": "error",
"no-tabs": "error",
"no-this-before-super": "error",
"no-throw-literal": "error",
"no-undef": "error",
"no-unneeded-ternary": "error",
"no-unreachable": "error",
"no-unsafe-finally": "error",
"no-unsafe-negation": "error",
"no-unused-expressions": "error",
"no-unused-vars": ["error", { "vars": "all", "args": "none" }],
"no-useless-call": "error",
"no-useless-computed-key": "error",
"no-useless-constructor": "error",
"no-useless-rename": "error",
"no-var": "error",
"no-void": "error",
"no-with": "error",
"object-shorthand": ["error", "always"],
"prefer-arrow-callback": "error",
"prefer-const": [
"error",
{ "destructuring": "all", "ignoreReadBeforeAssign": true }
],
"prefer-rest-params": "error",
"prefer-spread": "error",
"prefer-template": "error",
"prettier/prettier": "error",
"radix": "error",
"react/jsx-boolean-value": ["error", "never"],
"react/jsx-key": "error",
"react/jsx-no-duplicate-props": "error",
"react/jsx-no-target-blank": "error",
"react/jsx-no-undef": "error",
"react/jsx-uses-react": "error",
"react/jsx-uses-vars": "error",
"react/jsx-wrap-multilines": "error",
"react/no-deprecated": "error",
"react/no-did-mount-set-state": "error",
"react/no-did-update-set-state": "error",
"react/no-string-refs": "error",
"react/no-unknown-property": "error",
"react/react-in-jsx-scope": "error",
"react/self-closing-comp": "error",
"react/sort-prop-types": "error",
"spaced-comment": ["error", "always", { "exceptions": ["-"] }],
"use-isnan": "error",
"valid-jsdoc": [
"error",
{ "prefer": { "return": "returns" }, "requireReturn": false }
],
"valid-typeof": "error",
"yield-star-spacing": ["error", "after"],
"yoda": ["error", "never"],
"padding-line-between-statements": [
"error",
{ "blankLine": "always", "prev": "multiline-expression", "next": "*" },
{ "blankLine": "any", "prev": "multiline-expression", "next": "return" },
{ "blankLine": "always", "prev": "*", "next": "multiline-expression" },
{ "blankLine": "always", "prev": "*", "next": "multiline-expression" },
{ "blankLine": "any", "prev": "empty", "next": "multiline-expression" },
{ "blankLine": "always", "prev": "multiline-block-like", "next": "*" },
{ "blankLine": "any", "prev": "multiline-block-like", "next": "return" },
{ "blankLine": "always", "prev": "*", "next": "multiline-block-like" },
{ "blankLine": "always", "prev": "*", "next": "multiline-block-like" },
{ "blankLine": "any", "prev": "case", "next": "case" }
]
},
"overrides": [
{
"files": "**/test/**/*.js",
"rules": {
"import/no-extraneous-dependencies": false
}
}
]
}