Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcel Kloubert committed Mar 6, 2020
0 parents commit 1eb1fc3
Show file tree
Hide file tree
Showing 8 changed files with 1,370 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
19 changes: 19 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Publish
on:
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.0.0
- uses: actions/setup-node@v1.1.0
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- run: npm install
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
yarn.lock
.DS_Store
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2020 e.GO Digital GmbH, Aachen, Germany

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.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# eslint-config-ego

> ESLint [shareable config](http://eslint.org/docs/developer-guide/shareable-configs.html) for the [e.GO style guide](https://www.e-go-digital.com/)

## Installation

```
$ npm install --save-dev eslint eslint-config-ego
```

## Usage

Once the `eslint-config-ego` package is installed, you can use it by specifying `ego` in the [`extends`](http://eslint.org/docs/user-guide/configuring#extending-configuration-files) section of your [ESLint configuration](http://eslint.org/docs/user-guide/configuring).

```js
{
"extends": "ego",
"rules": {
// Additional, per-project rules...
}
}
```

## License

MIT © e.GO Digital GmbH
155 changes: 155 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
'use strict';

// MIT License
//
// Copyright (c) 2020 e.GO Digital GmbH, Aachen, Germany
//
// 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.

module.exports = {
"env": {
"browser": true,
"es6": true
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "tsconfig.json",
"sourceType": "module"
},
"plugins": [
"@typescript-eslint",
"unicorn",
"eslint-plugin-import",
"no-null"
],
"rules": {
"camelcase": "off",
"@typescript-eslint/array-type": "warn",
"@typescript-eslint/await-thenable": "warn",
"indent": "off",
"@typescript-eslint/indent": ["warn", 4],
"@typescript-eslint/interface-name-prefix": [
"warn",
{
"prefixWithI": "always",
},
],
"@typescript-eslint/member-delimiter-style": [
"warn",
{
"multiline": {
"delimiter": "semi",
"requireLast": true
},
"singleline": {
"delimiter": "semi",
"requireLast": false
}
}
],

"@typescript-eslint/naming-convention": [
"warn",
{
"selector": "typeLike",
"format": ["PascalCase"]
},
{
"selector": "function",
"format": ["camelCase"]
},
{
"selector": "method",
"format": ["camelCase"]
},
{
"selector": "memberLike",
"modifiers": ["private", "protected"],
"format": ["camelCase"],
"leadingUnderscore": "require"
},
{
"selector": "enumMember",
"format": ["PascalCase"]
},
{
"selector": "variable",
"types": ["boolean"],
"format": ["PascalCase"],
"prefix": ["is", "should", "has", "can", "did", "will"]
},
{
"selector": "variable",
"format": ["camelCase", "UPPER_CASE"]
},
{
"selector": "typeParameter",
"format": ["PascalCase"],
"prefix": ["T"]
},
{
"selector": "parameter",
"format": ["camelCase"],
"leadingUnderscore": "allow"
},
],

"@typescript-eslint/quotes": [
"warn",
"single"
],
"@typescript-eslint/semi": [
"warn",
"always"
],
"arrow-body-style": "warn",
"curly": "warn",
"eqeqeq": [
"warn",
"always"
],
"id-blacklist": [
"warn",
"any",
"Number",
"number",
"String",
"string",
"Boolean",
"boolean",
"Undefined",
"undefined"
],
"id-match": "warn",
"import/no-default-export": "warn",
"no-null/no-null": "off",
"no-redeclare": "warn",
"no-throw-literal": "warn",
"no-trailing-spaces": "warn",
"no-underscore-dangle": "warn",
"no-unused-expressions": "warn",
"no-var": "warn",
"spaced-comment": "warn",
"unicorn/filename-case": "warn",

"valid-jsdoc": "warn",
"no-irregular-whitespace": "warn",
"brace-style": "warn"
}
};
Loading

0 comments on commit 1eb1fc3

Please sign in to comment.