Skip to content

Commit

Permalink
feat: initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
coderbyheart committed Aug 11, 2019
0 parents commit a21772c
Show file tree
Hide file tree
Showing 9 changed files with 2,654 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
version: 2
jobs:
test:
docker:
- image: circleci/node:lts
working_directory: ~/repo
environment:
GK_LOCK_DEFAULT_BRANCH: saga
steps:
- checkout

- run:
name: Set up GitHub credentials
command: echo "machine github.com login ${GH_USERNAME} password ${GH_TOKEN}" > ~/.netrc

- run:
name: Install latest npm
command: sudo npm install -g npm@

# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package-lock.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-

- run:
name: Install dependencies
command: npm ci --no-audit

- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package-lock.json" }}

- run:
when: on_success
name: Run semantic relase
command: |
npm i semantic-release;
npx semantic-release || true
workflows:
version: 2
test:
jobs:
- test:
context: bifravst
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules/
npm-debug.log
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
package.json
package-lock.json
30 changes: 30 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
module.exports = {
printWidth: 80,
endOfLine: 'lf',
overrides: [
{
files: '*.js',
options: {
parser: 'babel',
singleQuote: true,
trailingComma: 'all',
useTabs: true,
semi: false,
},
},
{
files: '*.md',
options: {
parser: 'markdown',
proseWrap: 'always',
},
},
{
files: '*.yml,*yaml',
options: {
parser: 'yaml',
proseWrap: 'always',
},
},
],
}
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Bifravst TypeScript ESLint Config [![npm version](https://img.shields.io/npm/v/@bifravst/eslint-config-typescript.svg)](https://www.npmjs.com/package/@bifravst/eslint-config-typescript)

[![CircleCI](https://circleci.com/gh/bifravst/eslint-config-typescript/tree/saga.svg?style=svg)](https://circleci.com/gh/bifravst/eslint-config-typescript/tree/saga)
[![Greenkeeper badge](https://badges.greenkeeper.io/bifravst/eslint-config-typescript.svg)](https://greenkeeper.io/)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier/)
[![ESLint: TypeScript](https://img.shields.io/badge/ESLint-TypeScript-blue.svg)](https://github.com/typescript-eslint/typescript-eslint)

ESLint configuration (with
[TypeScript support](https://github.com/typescript-eslint/typescript-eslint))
for all Bifravst projects.

See [@bifravst/code-style](https://github.com/bifravst/code-style) for usage.
1 change: 1 addition & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = { extends: ['@commitlint/config-angular'] }
55 changes: 55 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json',
},
plugins: ['@typescript-eslint'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
],
rules: {
'@typescript-eslint/indent': ['error', 'tab'],
'@typescript-eslint/no-object-literal-type-assertion': ['off'],
'@typescript-eslint/explicit-function-return-type': ['off'],
'@typescript-eslint/await-thenable': ['error'],
'@typescript-eslint/no-extraneous-class': ['error'],
'@typescript-eslint/no-floating-promises': ['error'],
'@typescript-eslint/no-for-in-array': ['error'],
'@typescript-eslint/no-require-imports': ['error'],
'@typescript-eslint/no-this-alias': ['error'],
'@typescript-eslint/no-type-alias': ['off'],
'@typescript-eslint/no-unnecessary-type-assertion': ['error'],
'@typescript-eslint/no-useless-constructor': ['error'],
'@typescript-eslint/prefer-for-of': ['error'],
'@typescript-eslint/prefer-function-type': ['error'],
'@typescript-eslint/prefer-includes': ['error'],
'@typescript-eslint/prefer-readonly': ['error'],
'@typescript-eslint/prefer-regexp-exec': ['error'],
'@typescript-eslint/prefer-string-starts-ends-with': ['error'],
'@typescript-eslint/promise-function-async': ['error'],
'@typescript-eslint/require-array-sort-compare': ['error'],
'@typescript-eslint/restrict-plus-operands': ['error'],
semi: 'off',
'@typescript-eslint/semi': ['off'],
'@typescript-eslint/member-delimiter-style': [
'error',
{
multiline: {
delimiter: 'none',
requireLast: false,
},
singleline: {
delimiter: 'semi',
requireLast: false,
},
},
],
'@typescript-eslint/prefer-interface': ['off'],
'@typescript-eslint/consistent-type-definitions': ['error', 'type'],
'@typescript-eslint/no-explicit-any': ['off'],
'no-console': ['off'],
},
}
Loading

0 comments on commit a21772c

Please sign in to comment.