Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prettier + ESLint + onchange = Happiness #493

Merged
merged 1 commit into from
Nov 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to remove eslint config from package.json in this case

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point 👍

May I ask what the rationale behind these rules was? I'm wondering if I should move them over or not.

    "no-undefined": "off",
    "no-unused-vars": "off",

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

I'm not the right person for this question) I think these rules should not be disabled, they are helpful

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"
]
}
}
}