-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add separate eslint packages for Typescript and Flowtype (#723)
#723 See PR #720 Added separate packages for Typescript and Flowtype eslint rules. Co-authored-by: Chris Deacy <chrisdothtml@gmail.com> Co-authored-by: Chris Deacy <deacy@uber.com>
- Loading branch information
1 parent
e828c9d
commit 744e5da
Showing
20 changed files
with
2,280 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module.exports = { | ||
root: true, | ||
extends: require.resolve('./index.js'), | ||
env: { | ||
node: true | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[ignore] | ||
.*/node_modules/@uber/node-rosetta/.* | ||
.*/templates/.* | ||
|
||
[include] | ||
../node_modules | ||
../../node_modules | ||
|
||
[libs] | ||
../flow-typed/ | ||
|
||
[lints] | ||
|
||
[options] | ||
|
||
[strict] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<!-- | ||
Thank you for taking the time to submit an issue. | ||
Before opening a new issue, please search existing issues (https://github.com/fusionjs/eslint-config-fusion/issues) | ||
to double-check your issue isn't already known. | ||
To make it easier for us to help you — please follow the suggested format below. | ||
--> | ||
|
||
<!--- Provide a general summary of the issue in the title --> | ||
|
||
### Type of issue | ||
|
||
<!-- Feature request or bug --> | ||
|
||
### Description | ||
|
||
<!--- Describe the issue or the enhancement you want to see. --> | ||
|
||
### Current behavior | ||
|
||
<!--- What happens. --> | ||
|
||
### Expected behavior | ||
|
||
<!--- What should happen. --> | ||
|
||
### Steps to reproduce | ||
|
||
1. | ||
2. | ||
3. | ||
|
||
### Your environment | ||
|
||
* eslint-config-fusion-flowtype version: | ||
|
||
* Node.js version (`node --version`): | ||
|
||
* npm version (`npm --version`): | ||
|
||
* Operating System: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
registry=https://registry.yarnpkg.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2020 Uber Technologies, Inc. | ||
|
||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# eslint-config-fusion | ||
|
||
[![Build status](https://badge.buildkite.com/7a82192275779f6a8ba81f7d4a1b0d294256838faa1dfdf080.svg?branch=master)](https://buildkite.com/uberopensource/fusionjs) | ||
|
||
`eslint-config-fusion-flowtype` is an [eslint](https://www.github.com/eslint/eslint) config recommended for use with Fusion.js. | ||
|
||
## Usage | ||
|
||
Extend `eslint-config-fusion-flowtype` in your `.eslintrc.js`: | ||
|
||
```js | ||
module.exports = { | ||
extends: [ | ||
require.resolve('eslint-config-fusion-flowtype') | ||
] | ||
}; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// @flow | ||
module.exports = { | ||
extends: [ | ||
'plugin:flowtype/recommended', | ||
], | ||
|
||
plugins: [ | ||
'eslint-plugin-flowtype', | ||
], | ||
rules: { | ||
// Enforce flow file declarations | ||
'flowtype/require-valid-file-annotation': ['error', 'always'], | ||
|
||
// Enforces consistent spacing within generic type annotation parameters. | ||
// https://github.com/gajus/eslint-plugin-flowtype/blob/master/.README/rules/generic-spacing.md | ||
'flowtype/generic-spacing': 'off', | ||
|
||
// Fix inconsistency between Flow (inherited rule from flowtype/recommended) and Prettier | ||
// https://jeng.uberinternal.com/browse/WPT-3404 | ||
'flowtype/space-after-type-colon': 'off', | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"name": "eslint-config-fusion-flowtype", | ||
"version": "0.0.0-monorepo", | ||
"description": "eslint-config-fusion-flowtype is an eslint config recommended for use with FusionJS.", | ||
"license": "MIT", | ||
"repository": { | ||
"directory": "eslint-config-fusion-flowtype", | ||
"type": "git", | ||
"url": "https://github.com/fusionjs/fusionjs" | ||
}, | ||
"files": [ | ||
"rules", | ||
"index.js" | ||
], | ||
"main": "index.js", | ||
"peerDependencies": { | ||
"eslint-plugin-flowtype": "^3.11.1" | ||
}, | ||
"devDependencies": { | ||
"babel-eslint": "^10.0.1", | ||
"eslint": "^6.0.1", | ||
"eslint-plugin-flowtype": "^3.11.1", | ||
"flow-bin": "^0.109.0", | ||
"prettier": "^1.18.2" | ||
}, | ||
"scripts": { | ||
"lint": "eslint .", | ||
"test": "echo ok", | ||
"build": "echo ok", | ||
"flow": "flow check" | ||
}, | ||
"engines": { | ||
"node": ">=8.9.4", | ||
"npm": ">=5.0.0", | ||
"yarn": ">=1.0.0" | ||
}, | ||
"homepage": "https://fusionjs.com/api/eslint-config-fusion" | ||
} |
Oops, something went wrong.