Skip to content

Commit dba1ee6

Browse files
dekobonivanitskiy
andcommitted
Fixes nginx#165
Co-authored-by: Maxim Ivanitskiy <[email protected]>
1 parent 7e35275 commit dba1ee6

20 files changed

+5287
-86
lines changed

.eslintrc.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"extends": [
3+
"eslint:recommended",
4+
"plugin:@typescript-eslint/recommended",
5+
"plugin:prettier/recommended"
6+
],
7+
"ignorePatterns": ["**/node_modules/", "out/**", "test/"],
8+
"parser": "@typescript-eslint/parser",
9+
"parserOptions": {
10+
"ecmaVersion": 2015,
11+
"sourceType": "module"
12+
},
13+
"plugins": [
14+
"@typescript-eslint"
15+
],
16+
"rules": {
17+
"@typescript-eslint/no-unused-vars": [
18+
"warn",
19+
{
20+
"argsIgnorePattern": "^_",
21+
"varsIgnorePattern": "^_",
22+
"caughtErrorsIgnorePattern": "^_"
23+
}
24+
]
25+
},
26+
"root": true,
27+
"env": {
28+
"commonjs": true
29+
},
30+
"globals": {
31+
"ngx": "readonly",
32+
"process": "readonly",
33+
"Buffer": "readonly"
34+
}
35+
}

.github/workflows/lint.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Lint and format
2+
on:
3+
- push
4+
- pull_request
5+
6+
jobs:
7+
lint:
8+
name: Lint and check code style
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
- uses: actions/setup-node@v3
13+
- run: npm ci
14+
- run: npm run prettier
15+
- run: npm run eslint

.gitignore

Lines changed: 256 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,58 @@
1-
# Created by https://www.toptal.com/developers/gitignore/api/intellij
2-
# Edit at https://www.toptal.com/developers/gitignore?templates=intellij
1+
# Created by https://www.toptal.com/developers/gitignore/api/intellij+all,node,vim,emacs,macos
2+
# Edit at https://www.toptal.com/developers/gitignore?templates=intellij+all,node,vim,emacs,macos
33

4-
### Intellij ###
4+
### Emacs ###
5+
# -*- mode: gitignore; -*-
6+
*~
7+
\#*\#
8+
/.emacs.desktop
9+
/.emacs.desktop.lock
10+
*.elc
11+
auto-save-list
12+
tramp
13+
.\#*
14+
15+
# Org-mode
16+
.org-id-locations
17+
*_archive
18+
19+
# flymake-mode
20+
*_flymake.*
21+
22+
# eshell files
23+
/eshell/history
24+
/eshell/lastdir
25+
26+
# elpa packages
27+
/elpa/
28+
29+
# reftex files
30+
*.rel
31+
32+
# AUCTeX auto folder
33+
/auto/
34+
35+
# cask packages
36+
.cask/
37+
dist/
38+
39+
# Flycheck
40+
flycheck_*.el
41+
42+
# server auth directory
43+
/server/
44+
45+
# projectiles files
46+
.projectile
47+
48+
# directory configuration
49+
.dir-locals.el
50+
51+
# network security
52+
/network-security.data
53+
54+
55+
### Intellij+all ###
556
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
657
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
758

@@ -12,6 +63,9 @@
1263
.idea/**/dictionaries
1364
.idea/**/shelf
1465

66+
# AWS User-specific
67+
.idea/**/aws.xml
68+
1569
# Generated files
1670
.idea/**/contentModel.xml
1771

@@ -62,6 +116,9 @@ atlassian-ide-plugin.xml
62116
# Cursive Clojure plugin
63117
.idea/replstate.xml
64118

119+
# SonarLint plugin
120+
.idea/sonarlint/
121+
65122
# Crashlytics plugin (for Android Studio and IntelliJ)
66123
com_crashlytics_export_strings.xml
67124
crashlytics.properties
@@ -74,37 +131,209 @@ fabric.properties
74131
# Android studio 3.1+ serialized cache file
75132
.idea/caches/build_file_checksums.ser
76133

77-
### Intellij Patch ###
78-
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
134+
### Intellij+all Patch ###
135+
# Ignore everything but code style settings and run configurations
136+
# that are supposed to be shared within teams.
137+
138+
.idea/*
139+
140+
!.idea/codeStyles
141+
!.idea/runConfigurations
142+
143+
### macOS ###
144+
# General
145+
.DS_Store
146+
.AppleDouble
147+
.LSOverride
148+
149+
# Icon must end with two \r
150+
Icon
151+
152+
153+
# Thumbnails
154+
._*
155+
156+
# Files that might appear in the root of a volume
157+
.DocumentRevisions-V100
158+
.fseventsd
159+
.Spotlight-V100
160+
.TemporaryItems
161+
.Trashes
162+
.VolumeIcon.icns
163+
.com.apple.timemachine.donotpresent
164+
165+
# Directories potentially created on remote AFP share
166+
.AppleDB
167+
.AppleDesktop
168+
Network Trash Folder
169+
Temporary Items
170+
.apdisk
171+
172+
### macOS Patch ###
173+
# iCloud generated files
174+
*.icloud
175+
176+
### Node ###
177+
# Logs
178+
logs
179+
*.log
180+
npm-debug.log*
181+
yarn-debug.log*
182+
yarn-error.log*
183+
lerna-debug.log*
184+
.pnpm-debug.log*
185+
186+
# Diagnostic reports (https://nodejs.org/api/report.html)
187+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
188+
189+
# Runtime data
190+
pids
191+
*.pid
192+
*.seed
193+
*.pid.lock
194+
195+
# Directory for instrumented libs generated by jscoverage/JSCover
196+
lib-cov
197+
198+
# Coverage directory used by tools like istanbul
199+
coverage
200+
*.lcov
201+
202+
# nyc test coverage
203+
.nyc_output
204+
205+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
206+
.grunt
207+
208+
# Bower dependency directory (https://bower.io/)
209+
bower_components
210+
211+
# node-waf configuration
212+
.lock-wscript
213+
214+
# Compiled binary addons (https://nodejs.org/api/addons.html)
215+
build/Release
216+
217+
# Dependency directories
218+
node_modules/
219+
jspm_packages/
220+
221+
# Snowpack dependency directory (https://snowpack.dev/)
222+
web_modules/
223+
224+
# TypeScript cache
225+
*.tsbuildinfo
226+
227+
# Optional npm cache directory
228+
.npm
229+
230+
# Optional eslint cache
231+
.eslintcache
232+
233+
# Optional stylelint cache
234+
.stylelintcache
235+
236+
# Microbundle cache
237+
.rpt2_cache/
238+
.rts2_cache_cjs/
239+
.rts2_cache_es/
240+
.rts2_cache_umd/
241+
242+
# Optional REPL history
243+
.node_repl_history
244+
245+
# Output of 'npm pack'
246+
*.tgz
247+
248+
# Yarn Integrity file
249+
.yarn-integrity
250+
251+
# dotenv environment variable files
252+
.env
253+
.env.development.local
254+
.env.test.local
255+
.env.production.local
256+
.env.local
257+
258+
# parcel-bundler cache (https://parceljs.org/)
259+
.cache
260+
.parcel-cache
261+
262+
# Next.js build output
263+
.next
264+
out
265+
266+
# Nuxt.js build / generate output
267+
.nuxt
268+
dist
269+
270+
# Gatsby files
271+
.cache/
272+
# Comment in the public line in if your project uses Gatsby and not Next.js
273+
# https://nextjs.org/blog/next-9-1#public-directory-support
274+
# public
275+
276+
# vuepress build output
277+
.vuepress/dist
278+
279+
# vuepress v2.x temp and cache directory
280+
.temp
281+
282+
# Docusaurus cache and generated files
283+
.docusaurus
284+
285+
# Serverless directories
286+
.serverless/
287+
288+
# FuseBox cache
289+
.fusebox/
290+
291+
# DynamoDB Local files
292+
.dynamodb/
293+
294+
# TernJS port file
295+
.tern-port
296+
297+
# Stores VSCode versions used for testing VSCode extensions
298+
.vscode-test
299+
300+
# yarn v2
301+
.yarn/cache
302+
.yarn/unplugged
303+
.yarn/build-state.yml
304+
.yarn/install-state.gz
305+
.pnp.*
79306

80-
*.iml
81-
modules.xml
82-
.idea/misc.xml
83-
*.ipr
307+
### Node Patch ###
308+
# Serverless Webpack directories
309+
.webpack/
84310

85-
# Sonarlint plugin
86-
# https://plugins.jetbrains.com/plugin/7973-sonarlint
87-
.idea/**/sonarlint/
311+
# Optional stylelint cache
88312

89-
# SonarQube Plugin
90-
# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
91-
.idea/**/sonarIssues.xml
313+
# SvelteKit build / generate output
314+
.svelte-kit
92315

93-
# Markdown Navigator plugin
94-
# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
95-
.idea/**/markdown-navigator.xml
96-
.idea/**/markdown-navigator-enh.xml
97-
.idea/**/markdown-navigator/
316+
### Vim ###
317+
# Swap
318+
[._]*.s[a-v][a-z]
319+
!*.svg # comment out if you don't need vector files
320+
[._]*.sw[a-p]
321+
[._]s[a-rt-v][a-z]
322+
[._]ss[a-gi-z]
323+
[._]sw[a-p]
98324

99-
# Cache file creation bug
100-
# See https://youtrack.jetbrains.com/issue/JBR-2257
101-
.idea/$CACHE_FILE$
325+
# Session
326+
Session.vim
327+
Sessionx.vim
102328

103-
# CodeStream plugin
104-
# https://plugins.jetbrains.com/plugin/12206-codestream
105-
.idea/codestream.xml
329+
# Temporary
330+
.netrwhist
331+
# Auto-generated tag files
332+
tags
333+
# Persistent undo
334+
[._]*.un~
106335

107-
# End of https://www.toptal.com/developers/gitignore/api/intellij
336+
# End of https://www.toptal.com/developers/gitignore/api/intellij+all,node,vim,emacs,macos
108337

109338
# Test data files
110339
test-settings.*

.jsdocrc.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"plugins": [
3+
"node_modules/better-docs/typescript"
4+
],
5+
"source": {
6+
"include": ["./common/etc/nginx/include", "./node_modules/njs-types"],
7+
"includePattern": "\\.(jsx|js|ts|tsx)$",
8+
"excludePattern": "(^|\\/|\\\\)_"
9+
},
10+
"opts": {
11+
"template": "./node_modules/better-docs",
12+
"readme": "README.md",
13+
"verbose": true
14+
}
15+
}
16+

.prettierrc.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# style settings, see https://prettier.io/docs/en/options.html
2+
semi: true
3+
singleQuote: true
4+
trailingComma: es5
5+
tabWidth: 2

.tool-versions

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodejs 20.5.1

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"prettier.configPath": ".prettierrc.yml"
3+
}

0 commit comments

Comments
 (0)