Skip to content

Commit

Permalink
Readme guide updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
mgorunuch committed Nov 27, 2019
1 parent 57140fa commit f92d35c
Showing 1 changed file with 93 additions and 0 deletions.
93 changes: 93 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,98 @@
> Any fool can write code that a computer can understand. Good programmers write code that humans can understand.
> ###### Martin Fowler

#### Configs:
- [Stylelint](./packages/stylelint-config-spacetab-io)
- [Eslint](./packages/eslint-config-spacetab-io)
---

#### Content:
- [⚙ Eslint config integration](#eslint-config-integration)
- [⚙ Stylelint config integration](#stylelint-config-integration)

## Eslint config integration

First, what you need is to install npm package.
```bash
npm install --save-dev @spacetabs/eslint-config-spacetab-io
```

Next, install all peer dependencies. The easiest way is to add this lines to your `devDependensies`
```json
{
"eslint": "^6.6.0",
"@typescript-eslint/parser": "^2.9.0",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-simple-import-sort": "^4.0.0",
"eslint-plugin-vue": "^6.0.0",
"@typescript-eslint/eslint-plugin": "^2.6.1",
"@vue/eslint-config-typescript": "^4.0.0",
"vue-eslint-parser": "^7.0.0",
"typescript": "^3.6.4",
"babel-eslint": "^10.0.3"
}
```

After previous operations add this to your eslint configuration.
```json
{
"extends": [
"@spacetabs/eslint-config-spacetab-io"
],
"parserOptions": {
"project": "./tsconfig.json",
"sourceType": "module",
"extraFileExtensions": [".vue"]
}
}
```
**PROFIT!** Now you can use our eslint configuration in your awesome projects!

> Minimal eslint configuration example
```json
{
"root": true,
"parserOptions": {
"project": "./tsconfig.json",
"sourceType": "module",
"extraFileExtensions": [".vue"]
},
"extends": [
"@spacetabs/eslint-config-spacetab-io"
]
}
```

[⬆ Go top](#content)

------

## Stylelint config integration

First, what you need is to install npm package.
```bash
npm install --save-dev @spacetabs/eslint-config-spacetab-io
```

Next, install all peer dependencies. The easiest way is to add this lines to your `devDependensies`
```json
{
"stylelint": "^10.1.0",
"stylelint-config-recess-order": "^2.0.3",
"stylelint-config-standard": "^18.3.0",
"stylelint-declaration-use-variable": "^1.7.0",
"stylelint-scss": "^3.9.3"
}
```

```json
{
"extends": ["@spacetabs/stylelint-config-spacetab-io"]
}
```

After previous operations add this to your eslint configuration.
**PROFIT!** Now you can use our stylelint configuration in your awesome projects!

[⬆ Go top](#content)

0 comments on commit f92d35c

Please sign in to comment.