Skip to content

Commit f9f9e27

Browse files
Brendan Mulhollandbmulholland
authored andcommitted
chore(lint): prettier auto-format
1 parent c0d3585 commit f9f9e27

33 files changed

+313
-430
lines changed

.eslintrc

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,15 @@
11
{
2-
"extends": [
3-
"@nuxtjs/eslint-config-typescript",
4-
"prettier"
5-
],
6-
"plugins": [
7-
"prettier"
8-
],
2+
"extends": ["@nuxtjs/eslint-config-typescript", "prettier"],
3+
"plugins": ["prettier"],
94
"rules": {
105
"prettier/prettier": "error"
116
},
127
"overrides": [
138
{
149
"files": ["demo/pages/**/*.vue", "demo/layouts/**/*.vue"],
1510
"rules": {
16-
"vue/multi-word-component-names": "off",
17-
},
18-
},
19-
],
11+
"vue/multi-word-component-names": "off"
12+
}
13+
}
14+
]
2015
}

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,22 @@ about: Report a bug report to help us improve the module.
44
title: ''
55
labels: bug
66
assignees: ''
7-
87
---
98

109
### Version
10+
1111
module: <!-- ex: 5.9.0 -->
1212
nuxt: <!-- ex: 2.0.0 -->
1313

1414
### Nuxt configuration
15+
1516
#### [mode](https://nuxtjs.org/api/configuration-mode): <!--universal is the default -->
16-
- [ ] universal
17-
- [ ] spa
17+
18+
- [ ] universal
19+
- [ ] spa
1820

1921
### Nuxt configuration
22+
2023
<!--
2124
If relevant, please include the configuration you are using for this module.
2225
For example:
@@ -39,32 +42,39 @@ nuxt: <!-- ex: 2.0.0 -->
3942
-->
4043

4144
## Reproduction
45+
4246
> :warning: without a minimal reproduction we won't be able to look into your issue
47+
4348
<!--
4449
CodeSandbox template to use as a base for minimal repros: https://codesandbox.io/s/nuxt-auth-demo-45icg
4550
46-
**Helpful Links:**
51+
**Helpful Links:**
4752
- https://codesandbox.io/
4853
- https://github.com/nuxt-community/auth-module
4954
-->
5055

5156
#### What is expected?
57+
5258
#### What is actually happening?
59+
5360
#### Steps to reproduce
61+
5462
## Additional information
63+
5564
## Checklist
56-
* [ ] I have tested with the latest Nuxt version and the issue still occurs
57-
* [ ] I have tested with the latest module version and the issue still occurs
58-
* [ ] I have searched the issue tracker and this issue hasn't been reported yet
5965

60-
### Steps to reproduce
66+
- [ ] I have tested with the latest Nuxt version and the issue still occurs
67+
- [ ] I have tested with the latest module version and the issue still occurs
68+
- [ ] I have searched the issue tracker and this issue hasn't been reported yet
6169

70+
### Steps to reproduce
6271

6372
### What is expected?
6473

65-
6674
### What is actually happening?
75+
6776
<!-- Add any other context or screenshots about the feature request here. -->
6877

6978
### Performance analysis?
79+
7080
<!-- Add any performance metrics or regressions here -->

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,20 @@ about: Suggest an idea or enhancement for this project.
44
title: ''
55
labels: enhancement
66
assignees: ''
7-
87
---
98

109
### Is your feature request related to a problem? Please describe.
10+
1111
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
1212

1313
### Describe the solution you'd like to see
14+
1415
<!-- A clear and concise description of what you want to happen. -->
1516

1617
### Describe alternatives you've considered
18+
1719
<!-- A clear and concise description of any alternative solutions or features you've considered. -->
1820

1921
### Additional context
22+
2023
<!-- Add any other context or screenshots about the feature request here. -->

.github/ISSUE_TEMPLATE/question.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ about: Ask a question about the module.
44
title: ''
55
labels: question
66
assignees: ''
7-
87
---
98

109
<!--

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ node_modules
44
dist
55
docs/static/sw.js
66
temp
7+
coverage/

CHANGELOG.md

Lines changed: 164 additions & 272 deletions
Large diffs are not rendered by default.

api-extractor.json

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
{
2-
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3-
"mainEntryPointFilePath": "<projectFolder>/temp/types/index.d.ts",
4-
"bundledPackages": [],
5-
"compiler": {},
6-
"apiReport": {
7-
"enabled": false
8-
},
9-
"docModel": {
10-
"enabled": true
11-
},
12-
"dtsRollup": {
13-
"enabled": true,
14-
"untrimmedFilePath": "dist/index.d.ts"
15-
},
16-
"tsdocMetadata": {},
17-
"messages": {
18-
"extractorMessageReporting": {
19-
"ae-missing-release-tag": {
20-
"logLevel": "none"
21-
}
22-
}
23-
}
24-
}
1+
{
2+
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3+
"mainEntryPointFilePath": "<projectFolder>/temp/types/index.d.ts",
4+
"bundledPackages": [],
5+
"compiler": {},
6+
"apiReport": {
7+
"enabled": false
8+
},
9+
"docModel": {
10+
"enabled": true
11+
},
12+
"dtsRollup": {
13+
"enabled": true,
14+
"untrimmedFilePath": "dist/index.d.ts"
15+
},
16+
"tsdocMetadata": {},
17+
"messages": {
18+
"extractorMessageReporting": {
19+
"ae-missing-release-tag": {
20+
"logLevel": "none"
21+
}
22+
}
23+
}
24+
}

demo/tsconfig.json

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,7 @@
33
"target": "ES2018",
44
"module": "ESNext",
55
"moduleResolution": "node",
6-
"lib": [
7-
"ESNext",
8-
"ESNext.AsyncIterable",
9-
"DOM"
10-
],
6+
"lib": ["ESNext", "ESNext.AsyncIterable", "DOM"],
117
"esModuleInterop": true,
128
"allowJs": true,
139
"resolveJsonModule": true,
@@ -16,12 +12,8 @@
1612
"noEmit": true,
1713
"baseUrl": ".",
1814
"paths": {
19-
"~/*": [
20-
"./*"
21-
],
22-
"@/*": [
23-
"./*"
24-
]
15+
"~/*": ["./*"],
16+
"@/*": ["./*"]
2517
},
2618
"types": [
2719
"@types/node",

docs/content/en/api/options.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ auth: {
2222
}
2323
```
2424

25-
* `login`: User will be redirected to this path if *login is required*.
26-
* `logout`: User will be redirected to this path if *after logout, current route is protected*.
27-
* `home`: User will be redirected to this path *after login*. (`rewriteRedirects` will rewrite this path)
28-
* `callback`: User will be redirected to this path by the identity provider *after login*. (Should match configured `Allowed Callback URLs` (or similar setting) in your app/client with the identity provider)
25+
- `login`: User will be redirected to this path if _login is required_.
26+
- `logout`: User will be redirected to this path if _after logout, current route is protected_.
27+
- `home`: User will be redirected to this path _after login_. (`rewriteRedirects` will rewrite this path)
28+
- `callback`: User will be redirected to this path by the identity provider _after login_. (Should match configured `Allowed Callback URLs` (or similar setting) in your app/client with the identity provider)
2929

3030
Each redirect path can be disabled by setting to `false`.
3131
Also you can disable all redirects by setting `redirect` to `false`
@@ -51,8 +51,8 @@ auth: {
5151
}
5252
```
5353

54-
* **prefix** - Default prefix used in building a key for token storage across all storage providers.
55-
* **global** - Whether to automatically include the authentication token in all axios requests.
54+
- **prefix** - Default prefix used in building a key for token storage across all storage providers.
55+
- **global** - Whether to automatically include the authentication token in all axios requests.
5656

5757
## `localStorage`
5858

@@ -66,7 +66,7 @@ auth: {
6666
}
6767
```
6868

69-
* **prefix** - Default token prefix used in building a key for token storage in the browser's localStorage.
69+
- **prefix** - Default token prefix used in building a key for token storage in the browser's localStorage.
7070

7171
You can disable use of localStorage by setting `localStorage` to `false`, like so:
7272

@@ -93,13 +93,13 @@ auth: {
9393
}
9494
```
9595

96-
* **prefix** - Default token prefix used in building a key for token storage in the browser's localStorage.
97-
* **options** - Additional cookie options, passed to [cookie](https://www.npmjs.com/package/cookie).
98-
* `path` - path where the cookie is visible. Default is '/'.
99-
* `expires` - can be used to specify cookie lifetime in `Number` of days or specific `Date`. Default is session only.
100-
* `maxAge` - Specifies the number (in seconds) to be the value for the `Max-Age` (preferred over `expires`)
101-
* `domain` - domain (and by extension subdomain/s) where the cookie is visible. Default is domain and all subdomains.
102-
* `secure` - sets whether the cookie requires a secure protocol (https). Default is false, **should be set to true if possible**.
96+
- **prefix** - Default token prefix used in building a key for token storage in the browser's localStorage.
97+
- **options** - Additional cookie options, passed to [cookie](https://www.npmjs.com/package/cookie).
98+
- `path` - path where the cookie is visible. Default is '/'.
99+
- `expires` - can be used to specify cookie lifetime in `Number` of days or specific `Date`. Default is session only.
100+
- `maxAge` - Specifies the number (in seconds) to be the value for the `Max-Age` (preferred over `expires`)
101+
- `domain` - domain (and by extension subdomain/s) where the cookie is visible. Default is domain and all subdomains.
102+
- `secure` - sets whether the cookie requires a secure protocol (https). Default is false, **should be set to true if possible**.
103103

104104
Note: Using cookies is effectively **required** for universal mode (SSR) apps because authentication on first page load occurs **only** on the server side and local storage is not available on the server.
105105

@@ -121,15 +121,15 @@ See [Extending Auth Plugin](/recipes/extend)
121121

122122
## `resetOnError`
123123

124-
* Default: `false`
124+
- Default: `false`
125125

126126
Either a boolean or a function is accepted. If a function is passed, it will take the same arguments as `onError` handlers and return `Boolean` to inform whether a reset should be performed.
127127

128128
If enabled, user will be automatically logged out if an error happens. (For example when token expired)
129129

130130
## `rewriteRedirects`
131131

132-
* Default: `true`
132+
- Default: `true`
133133

134134
If enabled, user will redirect back to the original guarded route instead of `redirect.home`.
135135

@@ -141,12 +141,12 @@ If true, use the full route path with query parameters for redirect
141141

142142
## `vuex.namespace`
143143

144-
* Default: `auth`
144+
- Default: `auth`
145145

146146
Vuex store namespace for keeping state.
147147

148148
## `scopeKey`
149149

150-
* Default: `scope`
150+
- Default: `scope`
151151

152152
`user` object property used for scope checking (`hasScope`). Can be either an array or an object.

docs/content/en/api/refreshController.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ position: 54
55
category: API
66
---
77

8-
98
[Source Code](https://github.com/nuxt-community/auth-module/blob/dev/src/inc/refresh-controller.ts)
109

1110
**Refresh Controller** can be initialized in a scheme to add refresh support.
@@ -22,7 +21,7 @@ Initiate **RefreshController** in constructor
2221
export class SchemeName {
2322
constructor (auth, options) {
2423
super(auth, options)
25-
24+
2625
...
2726

2827
this.refreshController = new RefreshController(this)

0 commit comments

Comments
 (0)