Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Limon Monte committed Nov 8, 2019
0 parents commit 5933db5
Show file tree
Hide file tree
Showing 5 changed files with 130 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: build

on:
push:
branches:
- master
pull_request:

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1

- name: Install npm dependencies
run: yarn install

- name: Run automated release process with semantic-release
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
yarn add --dev [email protected] @semantic-release/changelog@3 @semantic-release/[email protected] @semantic-release/[email protected]
./node_modules/.bin/semantic-release
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# ESLint shareable config for the [SweetAlert2](https://github.com/sweetalert2/sweetalert2) JS/TS coding style

[![npm version](https://img.shields.io/npm/v/@sweetalert2/eslint-config.svg)](https://www.npmjs.com/package/@sweetalert2/eslint-config)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/sweetalert2/eslint-config/blob/master/CHANGELOG.md)
[![Greenkeeper badge](https://badges.greenkeeper.io/sweetalert2/eslint-config.svg)](https://greenkeeper.io/)

> ESLint [shareable config](http://eslint.org/docs/developer-guide/shareable-configs.html) for the [SweetAlert2](https://github.com/sweetalert2/sweetalert2) JS/TS coding style

## Installation

```
$ npm install --save-dev @sweetalert2/eslint-config
```

or

```
$ yarn add --dev @sweetalert2/eslint-config
```


## Usage

Once the `@sweetalert2/eslint-config` package is installed, you can use it by specifying `sweetalert2` 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": "@sweetalert2/eslint-config",
"rules": {
// Additional, per-project rules...
}
}
```
27 changes: 27 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
module.exports = {
parser: '@typescript-eslint/parser',
env: {
browser: true,
node: true,
commonjs: true,
es6: true
},
extends: [
'standard',
'plugin:@typescript-eslint/recommended'
],
rules: {
'@typescript-eslint/explicit-function-return-type': 0,
'@typescript-eslint/indent': ['error', 2],
'@typescript-eslint/no-this-alias': 0,
'@typescript-eslint/no-use-before-define': 0,
'@typescript-eslint/no-var-requires': 0,
'@typescript-eslint/no-empty-interface': 0,
'@typescript-eslint/no-explicit-any': 0,
'comma-dangle': 0,
'complexity': ['error', { max: 10 }],
'no-console': ['error', { allow: ['warn', 'error', 'info'] }],
'no-var': ['error'],
'quotes': ['error', 'single', { 'avoidEscape': true, 'allowTemplateLiterals': true }],
}
}
23 changes: 23 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "@sweetalert2/eslint-config",
"version": "1.0.0",
"description": "ESLint shareable config for the SweetAlert2 JS/TS coding style",
"repository": "sweetalert2/eslint-config",
"author": "Limon Monte <[email protected]> (https://limonte.github.io)",
"license": "MIT",
"files": [
"index.js"
],
"peerDependencies": {
"eslint": "^6.0.0"
},
"dependencies": {
"@typescript-eslint/eslint-plugin": "^2.0.0",
"@typescript-eslint/parser": "^2.0.0",
"eslint-config-standard": "^14.0.0",
"eslint-plugin-import": "^2.17.2",
"eslint-plugin-node": "^10.0.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.0"
}
}
21 changes: 21 additions & 0 deletions release.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
module.exports = {
debug: true,
branch: 'master',
verifyConditions: [
'@semantic-release/changelog',
'@semantic-release/npm',
'@semantic-release/github',
],
prepare: [
'@semantic-release/changelog',
'@semantic-release/npm',
'@semantic-release/git',
],
publish: [
'@semantic-release/npm',
'@semantic-release/github',
],
success: [
'@semantic-release/github',
]
}

0 comments on commit 5933db5

Please sign in to comment.