Skip to content

Commit

Permalink
chore: license and version
Browse files Browse the repository at this point in the history
  • Loading branch information
nekitk committed Apr 16, 2021
1 parent 3313eb4 commit 8dfcfa9
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 18 deletions.
21 changes: 21 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021 CSSSR Pte. Ltd. registered in Singapore under unique entity number 201909633C

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
30 changes: 17 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
[CSSSR](https://csssr.com)'s linting configs for Prettier and ESLint.

## [Documentation](docs_src/SUMMARY.md)

## Installation

First install `csssr-base-lint` itself:
First install `@csssr/linters` itself:
```bash
npm i -D CSSSR/csssr-base-lint
npm i -D @csssr/linters

yarn add -D CSSSR/csssr-base-lint
yarn add -D @csssr/linters
```

Then install peer dependencies (Prettier, ESLint and its plugins):
```bash
npx install-peerdeps -D CSSSR/csssr-base-lint
npx install-peerdeps -D @csssr/linters
```

## Prettier configuration
Expand All @@ -19,7 +23,7 @@ You may use your own Prettier config or use predefined one:
```js
// File: .prettierrc.js
module.exports = {
...require('csssr-base-lint/prettier.config'),
...require('@csssr/linters/prettier.config'),
}
```

Expand All @@ -38,8 +42,8 @@ Install [`@babel/eslint-parser`](https://github.com/babel/babel/tree/main/eslint
module.exports = {
parser: "@babel/eslint-parser",
extends: [
require.resolve('csssr-base-lint/eslint/base'),
require.resolve('csssr-base-lint/eslint/react'),
require.resolve('@csssr/linters/eslint/base'),
require.resolve('@csssr/linters/eslint/react'),
],
}
```
Expand All @@ -50,9 +54,9 @@ module.exports = {
// File: .eslintrc.js
module.exports = {
extends: [
require.resolve('csssr-base-lint/eslint/base'),
require.resolve('csssr-base-lint/eslint/react'),
require.resolve('csssr-base-lint/eslint/typescript'),
require.resolve('@csssr/linters/eslint/base'),
require.resolve('@csssr/linters/eslint/react'),
require.resolve('@csssr/linters/eslint/typescript'),
],
}
```
Expand All @@ -69,9 +73,9 @@ Feel free to add new plugins and rules and disable existing rules which are not
// File: .eslintrc.js
module.exports = {
extends: [
require.resolve('csssr-base-lint/eslint/base'),
require.resolve('csssr-base-lint/eslint/react'),
require.resolve('csssr-base-lint/eslint/typescript'),
require.resolve('@csssr/linters/eslint/base'),
require.resolve('@csssr/linters/eslint/react'),
require.resolve('@csssr/linters/eslint/typescript'),
],
plugins: ['todo-plz'],
rules: {
Expand Down
8 changes: 3 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
{
"name": "csssr-base-lint",
"version": "0.0.1",
"description": "",
"name": "@csssr/linters",
"version": "0.1.0",
"description": "CSSSR's linting configs for Prettier and ESLint",
"scripts": {
"build": "fundoc"
},
"repository": {
"type": "git",
"url": "git+https://github.com/CSSSR/csssr-base-lint.git"
},
"author": "",
"license": "ISC",
"bugs": {
"url": "https://github.com/CSSSR/csssr-base-lint/issues"
},
Expand Down

0 comments on commit 8dfcfa9

Please sign in to comment.