Thief of Wealth
  • npm i -D eslint

  • npm i prettier -D -E

  • npm i eslint-plugin-prettier eslint-config-prettier -D

  • npm i -D eslint-config-airbnb

  • .eslintrc.json

{
	"env": {
		"browser": true,
		"es6": true,
		"node": true
	},
	"extends": [
		"airbnb",
		"prettier/react",
		"eslint:recommended",
		"plugin:prettier/recommended"
	],
	"rules": {
		"react/jsx-filename-extension": [
			"error",
			{
				"extensions": [".js", ".jsx"]
			}
		],
		"react/jsx-curly-brace-presence": 1,
		"no-console": 0,
		"no-unused-vars": 1,
		"import/prefer-default-export": 1
	}
}
  • .prettierrc.json

{
    "singleQuote": true,
    "semi": true,
    "useTabs": true,
    "tabWidth": 4,
    "trailingComma": "all",
    "printWidth": 80
}

 

 

profile on loading

Loading...