Skip to content

Commit

Permalink
Add support for prettier + eslint + watcher
Browse files Browse the repository at this point in the history
  • Loading branch information
cjbarth committed Nov 13, 2020
1 parent 711956c commit 7ed7c1e
Show file tree
Hide file tree
Showing 8 changed files with 975 additions and 248 deletions.
13 changes: 0 additions & 13 deletions .editorconfig

This file was deleted.

1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
lib
23 changes: 23 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"env": {
"node": true,
"es6": false
},
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint", "prettier"],
"parserOptions": {
"ecmaVersion": 6
},

"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"rules": {
"no-console": "warn",
"prettier/prettier": "warn"
}
}
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Ignore artifacts:
node_modules
lib
1 change: 1 addition & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Passport-SAML
=============
[![Build Status](https://github.com/node-saml/passport-saml/workflows/Build%20Status/badge.svg)](https://github.com/node-saml/passport-saml/actions?query=workflow%3ABuild%Status) [![GitHub version](https://badge.fury.io/gh/node-saml%2Fpassport-saml.svg)](https://badge.fury.io/gh/node-saml%2Fpassport-saml) [![npm version](https://badge.fury.io/js/passport-saml.svg)](http://badge.fury.io/js/passport-saml) [![NPM](https://nodei.co/npm/passport-saml.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/passport-saml/)
[![Build Status](https://github.com/node-saml/passport-saml/workflows/Build%20Status/badge.svg)](https://github.com/node-saml/passport-saml/actions?query=workflow%3ABuild%Status) [![GitHub version](https://badge.fury.io/gh/node-saml%2Fpassport-saml.svg)](https://badge.fury.io/gh/node-saml%2Fpassport-saml) [![npm version](https://badge.fury.io/js/passport-saml.svg)](http://badge.fury.io/js/passport-saml) [![NPM](https://nodei.co/npm/passport-saml.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/passport-saml/) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)

This is a [SAML 2.0](http://en.wikipedia.org/wiki/SAML_2.0) authentication provider for [Passport](http://passportjs.org/), the Node.js authentication library.

Expand Down
1,110 changes: 917 additions & 193 deletions package-lock.json

Large diffs are not rendered by default.

70 changes: 29 additions & 41 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
{
"name": "passport-saml",
"version": "2.0.2",
"license": "MIT",
"description": "SAML 2.0 authentication strategy for Passport",
"keywords": [
"saml",
"adfs",
"sso",
"shibboleth"
],
"description": "SAML 2.0 authentication strategy for Passport",
"repository": {
"type": "git",
"url": "https://github.com/node-saml/passport-saml.git"
},
"license": "MIT",
"author": {
"name": "Henri Bergius",
"email": "[email protected]",
Expand All @@ -22,10 +26,7 @@
"Chris Barth",
"Andrii Kostenko"
],
"repository": {
"type": "git",
"url": "https://github.com/node-saml/passport-saml.git"
},
"main": "./lib/passport-saml",
"files": [
"lib",
"test",
Expand All @@ -34,7 +35,20 @@
"docs",
"package-lock.json"
],
"main": "./lib/passport-saml",
"scripts": {
"build": "tsc",
"lint": "eslint --ext .ts src",
"lint-watch": "onchange 'src/**/*.ts' -- eslint {{file}}",
"lint:fix": "eslint --ext .ts --fix src",
"prepublishOnly": "tsc",
"prettier-check": "prettier --config .prettierrc --check .",
"prettier-format": "prettier --config .prettierrc --write .",
"prettier-watch": "onchange 'src/**/*.ts' -- prettier --write {{file}}",
"test": "npm run lint && npm run tsc && mocha",
"tsc": "tsc",
"tsc-watch": "tsc && tsc --watch",
"watch": "concurrently --kill-others \"npm:*-watch\""
},
"dependencies": {
"debug": "^3.1.0",
"passport-strategy": "*",
Expand All @@ -51,13 +65,19 @@
"@types/xml-crypto": "^1.4.1",
"@types/xml2js": "^0.4.5",
"@types/xmldom": "^0.1.30",
"@typescript-eslint/eslint-plugin": "^4.6.0",
"@typescript-eslint/parser": "^4.6.0",
"@typescript-eslint/eslint-plugin": "^4.6.1",
"@typescript-eslint/parser": "^4.6.1",
"body-parser": "^1.17.1",
"concurrently": "^5.3.0",
"eslint": "^6.8.0",
"eslint-config-prettier": "^6.15.0",
"eslint-plugin-prettier": "^3.1.4",
"express": "^4.16.2",
"mocha": "^6.0.2",
"onchange": "^7.1.0",
"passport": "0.4.x",
"prettier": "2.1.2",
"prettier-plugin-packagejson": "^2.2.7",
"release-it": "^14.2.1",
"request": "^2.83.0",
"should": "*",
Expand All @@ -67,41 +87,9 @@
"engines": {
"node": ">= 10"
},
"scripts": {
"test": "npm run lint && npm run tsc && mocha",
"tsc": "tsc",
"lint": "eslint --ext .ts src",
"lint:fix": "eslint --ext .ts --fix src",
"prepublishOnly": "tsc"
},
"release-it": {
"github": {
"release": true
}
},
"eslintConfig": {
"env": {
"node": true,
"es6": false
},
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended"
],
"parserOptions": {
"ecmaVersion": 6
},
"rules": {
"no-undefined": "off",
"no-unused-vars": "off",
"semi": [
"error",
"always"
]
}
}
}

0 comments on commit 7ed7c1e

Please sign in to comment.