Fix linter / prettier not working when using sonar as VS Code workspace
Summary: Per title Reviewed By: antonk52 Differential Revision: D33308303 fbshipit-source-id: b4786fe8070b12ae211b68aafdc32814ea53381e
This commit is contained in:
committed by
Facebook GitHub Bot
parent
bc98a77cf7
commit
a3500c453b
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
@@ -5,7 +5,7 @@
|
||||
"eslint.packageManager": "yarn",
|
||||
"eslint.codeActionsOnSave.mode": "all",
|
||||
"editor.formatOnSave": true,
|
||||
"files.trimTrailingWhitespace": false, // This one is broken as it cleans string literals as well, killing Jest snapshots: https://github.com/Microsoft/vscode/issues/52711
|
||||
"files.trimTrailingWhitespace": false,
|
||||
"prettier.formatAlreadyFormattedFilesOnSave": false,
|
||||
"files.eol": "\n",
|
||||
"editor.codeActionsOnSave": {
|
||||
|
||||
@@ -7,10 +7,12 @@
|
||||
* @format
|
||||
*/
|
||||
|
||||
const path = require('path');
|
||||
|
||||
const fbjs = require('eslint-config-fbjs');
|
||||
|
||||
const rulesDirPlugin = require('eslint-plugin-rulesdir');
|
||||
rulesDirPlugin.RULES_DIR = 'eslint-rules';
|
||||
rulesDirPlugin.RULES_DIR = path.join(__dirname, 'eslint-rules');
|
||||
|
||||
// enforces copy-right header and @format directive to be present in every file
|
||||
const pattern = /^\*\r?\n[\S\s]*Facebook[\S\s]* \* @format\r?\n/;
|
||||
|
||||
Reference in New Issue
Block a user