Skip to content

Commit

Permalink
Initial commit of tooling config files
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesMessinger committed Feb 2, 2019
0 parents commit a1f45b0
Show file tree
Hide file tree
Showing 11 changed files with 287 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Editor config
# http://EditorConfig.org

# This EditorConfig overrides any parent EditorConfigs
root = true

# Default rules applied to all file types
[*]

# No trailing spaces, newline at EOF
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
end_of_line = lf

# 2 space indentation
indent_style = space
indent_size = 2

# JavaScript-specific settings
[*.{js,ts}]
quote_type = double
continuation_indent_size = 2
curly_bracket_next_line = false
indent_brace_style = BSD
spaces_around_operators = true
spaces_around_brackets = none
25 changes: 25 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Git attributes
# https://git-scm.com/docs/gitattributes
# https://git-scm.com/book/en/v2/Customizing-Git-Git-Attributes

# Normalize line endings for all files that git determines to be text.
# https://git-scm.com/docs/gitattributes#gitattributes-Settostringvalueauto
* text=auto

# Normalize line endings to LF on checkin, and do NOT convert to CRLF when checking-out on Windows.
# https://git-scm.com/docs/gitattributes#gitattributes-Settostringvaluelf
*.txt text eol=lf
*.html text eol=lf
*.md text eol=lf
*.css text eol=lf
*.scss text eol=lf
*.map text eol=lf
*.js text eol=lf
*.jsx text eol=lf
*.ts text eol=lf
*.tsx text eol=lf
*.json text eol=lf
*.yml text eol=lf
*.yaml text eol=lf
*.xml text eol=lf
*.svg text eol=lf
43 changes: 43 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Git ignore
# https://git-scm.com/docs/gitignore

# Miscellaneous
*~
*#
.DS_STORE
Thumbs.db
.netbeans
nbproject
.node_history

# IDEs & Text Editors
.idea
.sublime-*
.vscode
.netbeans
nbproject

# Temporary files
.tmp
.temp
.grunt
.lock-wscript

# Logs
/logs
*.log

# Runtime data
pids
*.pid
*.seed

# Dependencies
node_modules

# Test output
/.nyc_output
/coverage

# Build output
/lib
42 changes: 42 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Travis CI config
# http://docs.travis-ci.com/user/languages/javascript-with-nodejs/
# https://docs.travis-ci.com/user/customizing-the-build/
# https://docs.travis-ci.com/user/migrating-from-legacy/

filter_secrets: false
language: node_js

node_js:
- 10
- 8
- 6

os:
- linux
- osx
- windows

before_script:
- npm run lint
- npm run build

script:
- npm run coverage

after_success:
- cat ./coverage/lcov.info | coveralls

jobs:
include:
- stage: Deploy
name: Publish to npm
script: true
after_success: true
deploy:
provider: npm
email: $NPM_EMAIL
api_key: $NPM_API_KEY
skip_cleanup: true
on:
tags: true
branch: master
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2015 James Messinger

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.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Istanbul Code Coverage Loader for Webpack
==============================================

## ⚠ Work in Progress - Not ready to use yet ⚠
68 changes: 68 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"name": "coverage-istanbul-loader",
"version": "0.0.1",
"description": "A Webpack loader that uses Istanbul to add code coverage instrumentation",
"keywords": [
"webpack-loader",
"webpack",
"loader",
"istanbul",
"coverage",
"code coverage",
"instrumentation",
"instrumenter",
"sourcemap",
"source-map",
"sourcemaps",
"source-maps"
],
"author": {
"name": "James Messinger",
"url": "https://jamesmessinger.com"
},
"license": "(MIT OR CC-BY-NC-SA-4.0)",
"homepage": "https://jsdevtools.org/coverage-istanbul-loader",
"repository": {
"type": "git",
"url": "https://github.com/JS-DevTools/coverage-istanbul-loader.git"
},
"main": "lib/index.js",
"types": "lib/index.d.ts",
"files": [
"lib"
],
"scripts": {
"clean": "shx rm -rf .nyc_output coverage lib",
"lint": "npm run lint:typescript && npm run lint:javascript",
"lint:typescript": "tslint -p tsconfig.json",
"lint:javascript": "eslint test",
"build": "npm run clean && tsc",
"test": "mocha && npm run lint",
"coverage": "nyc --reporter=text --reporter=lcov mocha",
"upgrade": "npm-check -u",
"bump": "bump --prompt --tag --push --all",
"release": "npm run upgrade && npm run build && npm test && npm run bump"
},
"dependencies": {
"convert-source-map": "^1.6.0",
"istanbul-lib-instrument": "^3.0.0",
"loader-utils": "^1.2.3"
},
"devDependencies": {
"@types/node": "^10.12.21",
"@types/webpack": "^4.4.24",
"chai": "^4.2.0",
"coveralls": "^3.0.2",
"eslint": "^5.6.1",
"eslint-config-modular": "^6.0.0",
"mocha": "^5.2.0",
"npm-check": "^5.9.0",
"nyc": "^13.1.0",
"shx": "^0.3.2",
"tslint": "^5.12.0",
"tslint-modular": "^1.1.7",
"typescript": "^3.2.2",
"typescript-tslint-plugin": "^0.3.1",
"version-bump-prompt": "^4.2.1"
}
}
12 changes: 12 additions & 0 deletions test/.eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# ESLint config
# http://eslint.org/docs/user-guide/configuring
# https://github.com/JS-DevTools/eslint-config-modular

root: true

extends:
- modular/best-practices
- modular/style
- modular/node
- modular/es6
- modular/test
2 changes: 2 additions & 0 deletions test/mocha.opts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--bail
test/specs/**/*.spec.js
35 changes: 35 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"compilerOptions": {
"target": "esnext",
"module": "commonjs",
"moduleResolution": "node",
"esModuleInterop": true,
"lib": [
"esnext",
],

"outDir": "lib",
"sourceMap": true,
"declaration": true,

"newLine": "LF",
"forceConsistentCasingInFileNames": true,
"noImplicitAny": true,
"noImplicitThis": true,
"strictBindCallApply": true,
"strictNullChecks": true,
"strictPropertyInitialization": true,
"stripInternal": true,
"noFallthroughCasesInSwitch": true,

"plugins": [
{ "name": "typescript-tslint-plugin" }
]
},
"include": [
"src/**/*.ts"
],
"exclude": [
"node_modules"
]
}
8 changes: 8 additions & 0 deletions tslint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# TSLint config
# https://palantir.github.io/tslint/usage/configuration/
# https://github.com/JS-DevTools/tslint-modular

extends:
- tslint-modular/best-practices
- tslint-modular/style
- tslint-modular/node

0 comments on commit a1f45b0

Please sign in to comment.