Skip to content

Instantly share code, notes, and snippets.

@OneOfOne
Last active April 25, 2018 06:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save OneOfOne/c62e964cc159c22f36ce5dd535de2270 to your computer and use it in GitHub Desktop.
Save OneOfOne/c62e964cc159c22f36ce5dd535de2270 to your computer and use it in GitHub Desktop.
VSCode Settings
/*
used packages:
eslint eslint-config-airbnb eslint-plugin-import eslint-plugin-json eslint-plugin-jsx-a11y eslint-plugin-optimize-regex \
eslint-plugin-react eslint-plugin-typescript typescript-eslint-parser
global:
# add ~/.config/yarn/global/node_modules/.bin to your $PATH
yarn global add {packages}
local:
yarn add --dev {packages}
path: ~/.eslintrc.js
*/
module.exports = {
extends: ['eslint:recommended', 'airbnb', 'plugin:react/recommended'],
plugins: ['typescript', 'react', 'optimize-regex', 'json'],
parserOptions: {
ecmaVersion: 7,
sourceType: 'module',
},
env: {
browser: true,
node: true,
es6: true,
},
rules: {
'no-undef': 0,
'no-unused-vars': 0,
'no-console': 0,
'react/no-unescaped-entities': 0,
'react/display-name': 0,
'no-case-declarations': 0,
'curly': ['error', 'multi-line'],
'array-bracket-spacing': ['error', 'never'],
'jsx-quotes': ['error', 'prefer-double'],
// shit for airbnb
'radix': ['error', 'as-needed'],
'no-tabs': 0,
'no-multi-str': 0,
'no-restricted-globals': 0,
'max-len': ['error', { 'code': 160, 'tabWidth': 4, 'ignoreUrls': true }],
'prefer-template': 0,
'arrow-parens': ['error', 'always'],
'no-restricted-syntax': 0,
'one-var': 0,
'prefer-const': ['error', { destructuring: 'all' }],
'quote-props': ['error', 'consistent'],
'class-methods-use-this': 0,
'no-continue': 0,
'no-script-url': 0,
'default-case': 0,
'indent': ['error', 'tab', { SwitchCase: 1, VariableDeclarator: 1 }],
'object-curly-newline': ['error', { multiline: true }],
'no-plusplus': 0,
'react/sort-comp': 0,
'react/jsx-indent': ['error', 'tab'],
'react/jsx-indent-props': ['error', 'tab'],
'react/jsx-filename-extension': [1, { extensions: ['.ts', '.tsx'] }],
'react/no-did-mount-set-state': 0,
'react/no-array-index-key': 0,
'jsx-a11y/anchor-is-valid': 0,
'import/parsers': { 'typescript-eslint-parser': ['.ts', '.tsx'] },
'import/no-unresolved': 0,
'import/extensions': ['.ts', '.tsx'],
'import/prefer-default-export': 0,
'import/no-extraneous-dependencies': 0,
},
overrides: [
{
files: ['*.tsx'],
parser: 'typescript-eslint-parser',
parserOptions: { ecmaFeatures: { jsx: true } },
},
{
files: ['*.ts'],
parser: 'typescript-eslint-parser',
parserOptions: { ecmaFeatures: { jsx: false } },
},
],
};
[
{
"key": "ctrl+shift+d",
"command": "editor.action.copyLinesDownAction",
"when": "editorTextFocus"
},
{
"key": "ctrl+shift+alt+d",
"command": "editor.action.copyLinesUpAction",
"when": "editorTextFocus"
},
{
"key": "ctrl+m",
"command": "workbench.action.toggleMenuBar",
"when": "editorTextFocus"
},
{
"key": "ctrl+q",
"command": "workbench.action.quickOpenView"
},
{
"key": "ctrl+j",
"command": "editor.action.joinLines"
},
{
"key": "alt+left",
"command": "workbench.action.navigateBack"
},
{
"key": "alt+right",
"command": "workbench.action.navigateForward"
}
]
{
"editor.fontFamily": "Fira Code",
"editor.fontLigatures": true,
"editor.fontSize": 13,
"editor.fontWeight": "500",
"editor.tabSize": 4,
"editor.insertSpaces": false,
"editor.quickSuggestionsDelay": 50,
"editor.quickSuggestions": {
"other": true,
"comments": true,
"strings": false
},
"editor.rulers": [140],
"editor.cursorBlinking": "solid",
"editor.renderWhitespace": "boundary",
"editor.renderLineHighlight": "all",
"editor.renderIndentGuides": true,
"editor.formatOnSaveTimeout": 10000,
"editor.formatOnType": true,
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"editor.autoIndent": true,
"editor.dragAndDrop": false,
"editor.smoothScrolling": true,
"editor.minimap.renderCharacters": false,
"editor.minimap.showSlider": "always",
"editor.snippetSuggestions": "top",
"workbench.editor.enablePreview": true,
"workbench.editor.enablePreviewFromQuickOpen": false,
"workbench.editor.closeOnFileDelete": false,
"window.menuBarVisibility": "visible",
"window.openFilesInNewWindow": "on",
"window.newWindowDimensions": "maximized",
"window.restoreWindows": "none",
"window.closeWhenEmpty": true,
"terminal.integrated.shell.linux": "/bin/xonsh",
"terminal.external.linuxExec": "konsole",
"terminal.integrated.copyOnSelection": true,
"files.insertFinalNewline": true,
"files.trimTrailingWhitespace": true,
"files.encoding": "utf8",
"files.autoSave": "onFocusChange",
"files.associations": {
"*.mustache": "html",
"*.user": "json",
".tslintrc": "jsonc"
},
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
"**/*.pprof": true,
"**/*.prof": true,
"**/*.test": true,
"**/*.db": true,
"**/*.min.js": true,
"**/compiled.js": true,
"**/*.js": {
"when": "$(basename).ts"
},
"**/*.map": {
"when": "$(basename).map"
},
"node_modules": true
},
"search.quickOpen.includeSymbols": true,
"typescript.useCodeSnippetsOnMethodSuggest": true,
"typescript.referencesCodeLens.enabled": false,
"typescript.implementationsCodeLens.enabled": false,
"typescript.format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": false,
"typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": true,
"javascript.format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": false,
"javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": true,
"eslint.enable": true,
"eslint.packageManager": "yarn",
"eslint.provideLintTask": true,
"eslint.alwaysShowStatus": true,
"eslint.validate": ["json", "jsonc", "javascript", "javascriptreact", "typescript", "typescriptreact"],
"eslint.autoFixOnSave": true,
"go.formatTool": "goreturns",
"go.useCodeSnippetsOnFunctionSuggest": true,
"go.autocompleteUnimportedPackages": true,
"go.useCodeSnippetsOnFunctionSuggestWithoutType": true,
"go.docsTool": "gogetdoc",
"go.lintTool": "megacheck",
"go.buildFlags": ["-v"],
"go.testFlags": ["-v"],
"go.liveErrors": {
"enabled": true,
"delay": 200
},
"go.editorContextMenuCommands": {
"toggleTestFile": true,
"addTags": true,
"removeTags": true,
"testAtCursor": false,
"testFile": false,
"testPackage": true,
"generateTestForFunction": true,
"generateTestForFile": false,
"generateTestForPackage": true,
"addImport": false,
"testCoverage": true,
"playground": false
},
"go.addTags": {
"tags": "json",
"options": "json=omitempty",
"promptForTags": false,
"transform": "camelcase"
},
"go.coverageDecorator": "gutter",
"go.useLanguageServer": true,
"html.format.unformatted":
"p, a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var",
"html.format.endWithNewline": true,
"html.format.maxPreserveNewLines": 1,
"html.format.extraLiners": "-",
"html.suggest.angular1": false,
"html.suggest.ionic": false,
"markdownlint.config": {
"MD010": false,
"MD013": false,
"MD033": false,
"MD040": false
},
"emmet.showSuggestionsAsSnippets": true,
"php.suggest.basic": false,
"cSpell.language": "en,en-US",
"cSpell.allowCompoundWords": true,
"cSpell.enabled": false,
"cSpell.numSuggestions": 10,
"cSpell.userWords": [
"ASTs",
"CORS",
"Cashout",
"Cmps",
"Elts",
"Fira",
"Gruvbox",
"Influencers",
"Injectable",
"JSONP",
"Protos",
"TODO",
"Unimported",
"apiserv",
"apiv",
"autofetch",
"boltdb",
"csel",
"dups",
"fatih",
"fname",
"fset",
"gmail",
"gogetdoc",
"goimports",
"golang",
"gometalinter",
"jsbeautify",
"julienschmidt",
"konsole",
"nolint",
"oneofone",
"pidx",
"pprof",
"prox",
"rbuf",
"redir",
"samp",
"struct",
"structs",
"uint",
"ulimit",
"unmarshals",
"xast",
"xonsh",
"apiserv",
"jsonp"
],
"cSpell.ignoreRegExpList": ["0x[a-f0-9]+", "<?[\\w.\\-+]+@\\w+(\\.\\w+)+>?"],
"cSpell.ignorePaths": ["**/node_modules/**", "**/vscode-extension/**", "**/.git/**", ".vscode", "typings", ".gitignore"],
"git.autofetch": false,
"git.confirmSync": false,
"git.enableSmartCommit": true,
"git.enableCommitSigning": true,
"gitlens.advanced.messages": {
"suppressCommitHasNoPreviousCommitWarning": false,
"suppressCommitNotFoundWarning": false,
"suppressFileNotUnderSourceControlWarning": false,
"suppressGitVersionWarning": false,
"suppressLineUncommittedWarning": false,
"suppressNoRepositoryWarning": false,
"suppressResultsExplorerNotice": false,
"suppressShowKeyBindingsNotice": true,
"suppressUpdateNotice": false,
"suppressWelcomeNotice": false
},
"gitlens.keymap": "none",
"gitlens.statusBar.reduceFlicker": true,
"gitlens.historyExplorer.enabled": true,
"extensions.autoUpdate": true,
"extensions.showRecommendationsOnlyOnDemand": true,
"update.enableWindowsBackgroundUpdates": false,
"telemetry.enableTelemetry": false,
"telemetry.enableCrashReporter": false,
"code-runner.enableAppInsights": false,
"gitlens.advanced.telemetry.enabled": false,
"workbench.iconTheme": "material-icon-theme",
"material-icon-theme.showUpdateMessage": false,
"workbench.colorTheme": "Gruvbox Dark (Medium Contrast)",
"workbench.colorCustomizations": {
"[Gruvbox Dark (Medium Contrast)]": {
"editor.background": "#222",
"statusBar.background": "#333",
"panel.background": "#333",
"sideBar.background": "#222",
"tab.activeBackground": "#555",
"tab.inactiveBackground": "#333",
"tab.inactiveForeground": "#aaa"
}
},
"window.zoomLevel": 1,
"code-runner.saveFileBeforeRun": true,
"code-runner.runInTerminal": true,
"emeraldwalk.runonsave": {
"commands": [
{
"match": "\\.(json|css|eslintrc.js)$",
"isAsync": true,
"cmd": "eslint --fix --ignore-pattern '!.eslintrc.js' '${file}'"
}
]
},
"[jsonc]": {
"editor.formatOnType": false,
"editor.formatOnSave": false,
"editor.formatOnPaste": false
},
"[html]": {
"editor.formatOnType": false,
"editor.formatOnSave": false,
"editor.formatOnPaste": false
},
"[css]": {
"editor.formatOnType": false,
"editor.formatOnSave": false,
"editor.formatOnPaste": false
},
"[javascript]": {
"editor.formatOnType": false,
"editor.formatOnSave": false,
"editor.formatOnPaste": false
},
"[javascriptreact]": {
"editor.formatOnType": false,
"editor.formatOnSave": false,
"editor.formatOnPaste": false
},
"[typescript]": {
"editor.formatOnType": false,
"editor.formatOnSave": false,
"editor.formatOnPaste": false
},
"[typescriptreact]": {
"editor.formatOnType": false,
"editor.formatOnSave": false,
"editor.formatOnPaste": false
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment