eslint-config-tasoskakour-typescript-prettier

3.0.0 • Public • Published

eslint-config-tasoskakour-typescript-prettier

ESLint + Prettier Typescript shareable config for tasoskakour’s coding style

This repo structure is heavily influenced by my buddy's Napoleon repo: https://github.com/iamnapo/eslint-config-iamnapo

Install

Make sure you have already installed eslint and typescript as they are required packages.

yarn add -D eslint-config-tasoskakour-typescript-prettier

Then, add this to your .eslintrc.js:

module.exports = {
	extends: "tasoskakour-typescript-prettier",
	rules: {
		// your overrides
	},
};

Usage for React

Adjust your .eslintrc.js like this:

module.exports = {
	extends: "tasoskakour-typescript-prettier/with-react",
	rules: {
		// your overrides
	},
};

Add .eslintignore for certain files

Personally I like to use this .eslintignore:

*.css
*.svg

(Optional) Add .prettierc.json with my preferred configuration

{
    "printWidth": 100,
    "trailingComma": "es5",
    "tabWidth": 4,
    "semi": true,
    "singleQuote": true
}

(Optional) Linting with vscode

If you are using vscode this .vscode/settings.json file may come in handy:

{
    "editor.defaultFormatter": "dbaeumer.vscode-eslint",
    "editor.formatOnSave": true,
    "eslint.alwaysShowStatus": true,
    "editor.codeActionsOnSave": {
        "source.fixAll.eslint": true
    },
    "editor.rulers": [100]
}

Package Sidebar

Install

npm i eslint-config-tasoskakour-typescript-prettier

Weekly Downloads

5

Version

3.0.0

License

MIT

Unpacked Size

7.41 kB

Total Files

7

Last publish

Collaborators

  • tasoskakour