Skip to content

Commit

Permalink
Merge pull request #26 from 3fs/default-config
Browse files Browse the repository at this point in the history
fix(fe): Default config
  • Loading branch information
zvan authored Oct 16, 2023
2 parents 25c1738 + 6e291f2 commit f129bd2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 40 deletions.
45 changes: 7 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ git push origin v1.0.0
## Installation

```sh
npm install @3fs/eslint-config [eslint@7.17.0]
npm install @3fs/eslint-config eslint
# OR
yarn add @3fs/eslint-config [eslint@7.17.0]
yarn add @3fs/eslint-config eslint
```

## Usage
Expand All @@ -29,9 +29,9 @@ official ESLint website.
To use this shareable config, first run this:

```sh
npm install --save-dev eslint@7.17.0 @3fs/eslint-config
npm install --save-dev eslint @3fs/eslint-config
# OR
yarn add --dev eslint@7.17.0 @3fs/eslint-config
yarn add --dev eslint @3fs/eslint-config
```

Then, add this to your .eslintrc(.js|.json|.yml) file:
Expand All @@ -42,43 +42,12 @@ Then, add this to your .eslintrc(.js|.json|.yml) file:
}
```

*Note: We omitted the `/eslint-config` sufix since it is automatically assumed by ESLint. Only works for esnext since its specified as default*
_Note: We omitted the `/eslint-config` sufix since it is automatically assumed by ESLint. Only works for esnext since its specified as default_

You can override settings from the shareable config by adding them directly into your
`.eslintrc` file.

### All available configs

* `@3fs` or `@3fs/eslint-config/configs/esnext` - ES6+ config; Requires [[email protected]][babel-eslint]
* `@3fs/eslint-config/configs/es5` - ES5 config
* `@3fs/eslint-config/configs/node` - ES6+ NodeJS config; Requires [[email protected]][babel-eslint]
* `@3fs/eslint-config/configs/node-es5` - ES5 NodeJS config
* `@3fs/eslint-config/configs/ng` - AngularJS config; Requires [[email protected]][eslint-plugin-angular]
* `@3fs/eslint-config/configs/react` - React config; Requires [[email protected]][babel-eslint], [[email protected]][eslint-plugin-react], [[email protected]][eslint-plugin-jsx-a11y], [[email protected]][eslint-plugin-react-hooks]
* `@3fs/eslint-config/configs/react-native` - React Native config; Requires [[email protected]][babel-eslint], [[email protected]][eslint-plugin-react], [[email protected]][eslint-plugin-jsx-a11y] and [[email protected]][eslint-plugin-react-native]
* `@3fs/eslint-config/configs/ts` - TypeScript config; Requires [[email protected]][typescript], [@typescript-eslint/eslint-plugin@4.12.0][@typescript-eslint/eslint-plugin], [@typescript-eslint/parser@4.12.0][@typescript-eslint/parser]



[//]: # (URLs)

[//]: # (main)

[npm-image]: https://img.shields.io/npm/v/@3fs/eslint-config.svg
[npm-url]: https://npmjs.org/package/@3fs/eslint-config
[downloads-image]: https://img.shields.io/npm/dm/@3fs/eslint-config.svg
[downloads-url]: https://npmjs.org/package/@3fs/eslint-config
[shareable-configs-url]: http://eslint.org/docs/developer-guide/shareable-configs

[//]: # (other)

[babel-eslint]: https://www.npmjs.com/package/babel-eslint
[eslint-plugin-angular]: https://www.npmjs.com/package/eslint-plugin-angular
[eslint-plugin-react]: https://www.npmjs.com/package/eslint-plugin-react
[eslint-plugin-jsx-a11y]: https://www.npmjs.com/package/eslint-plugin-jsx-a11y
[eslint-plugin-react-hooks]: https://www.npmjs.com/package/eslint-plugin-react-hooks
[typescript]: https://www.npmjs.com/package/typescript
[@typescript-eslint/parser]: https://www.npmjs.com/package/@typescript-eslint/parser
[@typescript-eslint/eslint-plugin]: https://www.npmjs.com/package/@typescript-eslint/eslint-plugin
[eslint-plugin-react-native]: https://www.npmjs.com/package/eslint-plugin-react-native

- `@3fs` or `@3fs/eslint-config/configs/angular` - Angular config
- `@3fs/eslint-config/configs/react` - React config
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require('./configs/esnext');
module.exports = require('./configs/angular');
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@3fs/eslint-config",
"version": "2.0.0",
"version": "2.0.1",
"description": "3fs ESLint Config",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit f129bd2

Please sign in to comment.