Created
April 11, 2020 06:31
-
-
Save yosukehasumi/8c91df2457769d0a4ff462dcfd2d6ced to your computer and use it in GitHub Desktop.
SublimeText3 - eslint configuration and setup
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
// Install all dependencies without the need for a package.json like this | |
// npm install eslint typescript @typescript-eslint/parser eslint-plugin-react@latest @typescript-eslint/eslint-plugin@latest eslint-plugin-react-hooks@latest | |
// npx install-peerdeps --dev eslint-config-airbnb | |
// For SublimeText users, install | |
// 1. SublimeLinter | |
// 2. SublimeLinter - eslint | |
// SublimeLinter Settings - User | |
// { | |
// "debug": true, | |
// "lint_mode": "save", | |
// "paths": { | |
// "osx": [ | |
// "~/.rbenv/shims", | |
// ] | |
// }, | |
// "linters": { | |
// "eslint": { | |
// "selector": "source.js, source.ts, source.tsx" | |
// } | |
// } | |
// } | |
module.exports = { | |
env: { | |
browser: true, | |
es6: true, | |
}, | |
extends: [ | |
"plugin:react/recommended", | |
"airbnb", | |
"eslint:recommended", | |
"plugin:@typescript-eslint/eslint-recommended", | |
"plugin:@typescript-eslint/recommended", | |
], | |
globals: { | |
Atomics: "readonly", | |
SharedArrayBuffer: "readonly", | |
}, | |
parser: "@typescript-eslint/parser", | |
parserOptions: { | |
ecmaFeatures: { | |
jsx: true, | |
}, | |
ecmaVersion: 2018, | |
sourceType: "module", | |
}, | |
plugins: ["react", "react-hooks", "@typescript-eslint"], | |
rules: {}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment