forked from firefox-devtools/profiler
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request firefox-devtools#402 from julienw/prettier
Add prettier to our codebase
- Loading branch information
Showing
142 changed files
with
6,334 additions
and
3,352 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,111 +1,83 @@ | ||
module.exports = { | ||
"env": { | ||
"browser": true, | ||
"es6": true, | ||
"node": true | ||
"env": { | ||
"browser": true, | ||
"es6": true, | ||
"node": true | ||
}, | ||
"parser": "babel-eslint", | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:react/recommended", | ||
"plugin:flowtype/recommended", | ||
"prettier", | ||
"prettier/flowtype", | ||
"prettier/react" | ||
], | ||
"parserOptions": { | ||
"ecmaVersion": "2017", | ||
"ecmaFeatures": { | ||
"experimentalObjectRestSpread": true, | ||
"jsx": true | ||
}, | ||
"parser": "babel-eslint", | ||
"extends": ["eslint:recommended", "plugin:react/recommended"], | ||
"parserOptions": { | ||
"ecmaFeatures": { | ||
"experimentalObjectRestSpread": true, | ||
"jsx": true | ||
}, | ||
"sourceType": "module" | ||
}, | ||
"plugins": [ | ||
"react", | ||
"flowtype", | ||
"import" | ||
], | ||
"rules": { | ||
// Flow type rules: | ||
"flowtype/define-flow-type": 1, | ||
"flowtype/use-flow-type": 1, | ||
"flowtype/generic-spacing": [2, "never"], | ||
"flowtype/space-before-type-colon": [ 2, "never" ], | ||
"flowtype/space-after-type-colon": [ 2, "always" ], | ||
"flowtype/delimiter-dangle": [ 2, "always-multiline" ], | ||
"sourceType": "module" | ||
}, | ||
"plugins": [ | ||
"react", | ||
"flowtype", | ||
"import", | ||
"prettier" | ||
], | ||
"rules": { | ||
// ES6 Import rules: | ||
"import/no-duplicates": "error", | ||
"import/no-unresolved": "error", | ||
"import/named": "error", | ||
"prettier/prettier": ["error", { singleQuote: true, trailingComma: "es5" }], | ||
|
||
// ES6 Import rules: | ||
"import/no-duplicates": "error", | ||
"import/no-unresolved": "error", | ||
"import/named": "error", | ||
// overriding recommended rules | ||
"no-constant-condition": ["error", { checkLoops: false }], | ||
"no-console": [ "error", { allow: ["log", "warn", "error"] } ], | ||
"no-unused-vars": ["error", { "argsIgnorePattern": "^_" }], | ||
|
||
// JS Rules: | ||
"indent": [ | ||
"error", | ||
2, | ||
{ "SwitchCase": 1 } | ||
], | ||
"linebreak-style": [ "error", "unix" ], | ||
"quotes": [ "error", "single", { "avoidEscape": true } ], | ||
"semi": [ "error", "always" ], | ||
"no-extra-semi": "error", | ||
"comma-dangle": [ "error", "always-multiline" ], | ||
"no-console": [ "error", { allow: ["log", "warn", "error"] } ], | ||
"eqeqeq": "error", | ||
"consistent-return": "error", | ||
"curly": ["error", "all" ], | ||
"dot-location": ["error", "property"], | ||
"dot-notation": "error", | ||
"no-alert": "error", | ||
"no-caller": "error", | ||
"no-constant-condition": ["error", { checkLoops: false }], | ||
"no-else-return": "error", | ||
"no-eval": "error", | ||
"no-implied-eval": "error", | ||
"no-extend-native": "error", | ||
"no-native-reassign": "error", | ||
"no-extra-bind": "error", | ||
"no-labels": "error", | ||
"no-implicit-globals": "error", | ||
"no-invalid-this": "error", | ||
"no-iterator": "error", | ||
"no-lone-blocks": "error", | ||
"no-loop-func": "error", | ||
"no-multi-spaces": "error", | ||
"no-param-reassign": "error", | ||
"no-proto": "error", | ||
"no-return-assign": "error", | ||
"no-script-url": "error", | ||
"no-self-compare": "error", | ||
"no-throw-literal": "error", | ||
"no-unmodified-loop-condition": "error", | ||
"no-unused-expressions": "error", | ||
"no-useless-concat": "error", | ||
"no-useless-escape": "error", | ||
"no-void": "error", | ||
"no-with": "error", | ||
"radix": "error", | ||
"yoda": ["error", "never", { "exceptRange": true }], | ||
"brace-style": ["error", "1tbs", { "allowSingleLine": true }], | ||
"camelcase": "error", | ||
"comma-spacing": "error", | ||
"comma-style": "error", | ||
"jsx-quotes": ["error", "prefer-single"], | ||
"key-spacing": "error", | ||
"keyword-spacing": "error", | ||
"no-new-object": "error", | ||
"no-spaced-func": "error", | ||
"semi-spacing": "error", | ||
"space-in-parens": ["error", "never"], | ||
"spaced-comment": "error", | ||
"generator-star-spacing": "error", | ||
"no-var": "error", | ||
"prefer-const": "error", | ||
"array-bracket-spacing": "error", | ||
"space-before-function-paren": ["error", { | ||
"anonymous": "always", | ||
"named": "never", | ||
"asyncArrow": "always", | ||
}], | ||
"arrow-parens": ["error", "as-needed"], | ||
}, | ||
"settings": { | ||
"react": { | ||
"pragma": "React", | ||
"version": "15.0" | ||
} | ||
// possible errors | ||
"array-callback-return": "error", | ||
"consistent-return": "error", | ||
// "default-case": "error", // to be enabled after fixing issues in our code | ||
"dot-notation": "error", | ||
"eqeqeq": "error", | ||
// "for-direction": "error", // to be enabled after we upgrade eslint | ||
"no-alert": "error", | ||
"no-caller": "error", | ||
"no-eval": "error", | ||
"no-extend-native": "error", | ||
"no-extra-bind": "error", | ||
"no-extra-label": "error", | ||
"no-implied-eval": "error", | ||
"no-invalid-this": "error", | ||
"no-return-await": "error", | ||
"no-self-compare": "error", | ||
"no-throw-literal": "error", | ||
"no-unmodified-loop-condition": "error", | ||
// "no-unused-expression": "error", // to be enabled after we upgrade eslint | ||
// "no-use-before-define": "error", // to be enabled after fixing issues in our code | ||
"no-useless-call": "error", | ||
"no-useless-computed-key": "error", | ||
"no-useless-concat": "error", | ||
"no-useless-constructor": "error", | ||
"no-useless-rename": "error", | ||
"no-useless-return": "error", | ||
"no-var": "error", | ||
"no-void": "error", | ||
"no-with": "error", | ||
"prefer-const": "error", | ||
// "prefer-promise-reject-errors": "error", // to be enabled after fixing issues in our code | ||
// "prefer-rest-params": "error", // to be enabled after fixing issues in our code | ||
"prefer-spread": "error", | ||
}, | ||
"settings": { | ||
"react": { | ||
"pragma": "React", | ||
"version": "15.0" | ||
} | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.