This repository has been archived by the owner on Jun 7, 2024. It is now read-only.
forked from vanilla/vanilla
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8a2eaea
commit 047ab27
Showing
9 changed files
with
556 additions
and
124 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
**/node_modules/** | ||
**/bower_components/** | ||
**/*.js | ||
**/*.jsx |
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,3 @@ | ||
{ | ||
"extends": "@vanilla/eslint-config" | ||
} |
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,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2019 Vanilla Forums | ||
|
||
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,70 @@ | ||
/** | ||
* @copyright 2009-2019 Vanilla Forums Inc. | ||
* @license MIT | ||
*/ | ||
|
||
module.exports = { | ||
parser: "@typescript-eslint/parser", | ||
plugins: ["@typescript-eslint", "react", "jsx-a11y"], | ||
extends: [ | ||
"eslint:recommended", | ||
"plugin:react/recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
// "plugin:jsx-a11y/recommended", | ||
"prettier", | ||
"prettier/react", | ||
"prettier/@typescript-eslint", | ||
], | ||
parserOptions: { | ||
project: "./tsconfig.json", | ||
}, | ||
settings: { | ||
react: { | ||
version: "detect", | ||
}, | ||
}, | ||
rules: { | ||
// We have typescript for these. | ||
"no-undef": "off", | ||
"getter-return": "off", | ||
"no-dupe-class-members": "off", | ||
|
||
// Typescript specific rules | ||
"@typescript-eslint/ban-types": [ | ||
"error", | ||
{ | ||
types: { | ||
Object: "Avoid using the `Object` type. Did you mean `object`?", | ||
Function: "Avoid using the `Function` type. Prefer a specific function type, like `() => void`.", | ||
Boolean: "Avoid using the `Boolean` type. Did you mean `boolean`?", | ||
Number: "Avoid using the `Number` type. Did you mean `number`?", | ||
String: "Avoid using the `String` type. Did you mean `string`?", | ||
Symbol: "Avoid using the `Symbol` type. Did you mean `symbol`?", | ||
}, | ||
}, | ||
], | ||
"@typescript-eslint/camelcase": "off", | ||
"@typescript-eslint/array-type": ["error", "array-simple"], | ||
"@typescript-eslint/interface-name-prefix": ["error", "always"], | ||
"@typescript-eslint/no-empty-interface": "off", | ||
"@typescript-eslint/no-parameter-properties": "off", | ||
"@typescript-eslint/no-use-before-define": "off", | ||
"@typescript-eslint/no-object-literal-type-assertion": "off", | ||
"@typescript-eslint/no-var-requires": "off", | ||
|
||
// These are currently too strict to enable here | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"@typescript-eslint/no-non-null-assertion": "off", | ||
"@typescript-eslint/explicit-function-return-type": "off", | ||
|
||
// A11Y | ||
"jsx-a11y/html-has-lang": "off", // https://github.com/evcohen/eslint-plugin-jsx-a11y/issues/565 | ||
|
||
// I want to be able to turn these on the future. | ||
// but they each have a lot of files to fix and should be their own PR. | ||
"@typescript-eslint/explicit-member-accessibility": "off", | ||
"@typescript-eslint/no-unused-vars": "off", | ||
"@typescript-eslint/await-thenable": "off", | ||
"@typescript-eslint/promise-function-async": "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,18 @@ | ||
{ | ||
"name": "@vanilla/eslint-config", | ||
"description": "The official Vanilla eslint configuration.", | ||
"version": "3.0.0", | ||
"main": "index.js", | ||
"peerDependencies": { | ||
"eslint": "^5.16.0" | ||
}, | ||
"dependencies": { | ||
"@typescript-eslint/eslint-plugin": "^1.9.0", | ||
"@typescript-eslint/parser": "^1.9.0", | ||
"eslint": "^5.16.0", | ||
"eslint-config-prettier": "^4.3.0", | ||
"eslint-plugin-import": "^2.17.3", | ||
"eslint-plugin-jsx-a11y": "^6.2.1", | ||
"eslint-plugin-react": "^7.13.0" | ||
} | ||
} |
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.