зеркало из
1
0
Форкнуть 0
More config

More config
This commit is contained in:
Timothee Guerin 2020-12-03 13:42:24 -08:00
Родитель 8024c8d4d5
Коммит 666fb77fef
5 изменённых файлов: 385 добавлений и 65 удалений

Просмотреть файл

@ -1,61 +1,50 @@
---
parser: "@typescript-eslint/parser"
plugins:
- "@typescript-eslint"
- "@typescript-eslint"
- prettier
env:
es6: true
node: true
extends:
- eslint:recommended
- plugin:@typescript-eslint/recommended
- eslint:recommended
- plugin:@typescript-eslint/recommended
globals:
Atomics: readonly
SharedArrayBuffer: readonly
parserOptions:
ecmaVersion: 2018
sourceType: module
warnOnUnsupportedTypeScriptVersion : false
warnOnUnsupportedTypeScriptVersion: false
rules:
"@typescript-eslint/no-this-alias" : 'off'
"@typescript-eslint/interface-name-prefix": 'off'
"@typescript-eslint/explicit-function-return-type": 'off'
"@typescript-eslint/no-explicit-any": 'off'
"@typescript-eslint/no-empty-interface": 'off'
"@typescript-eslint/no-namespace": 'off'
"@typescript-eslint/explicit-member-accessibility": 'off'
"@typescript-eslint/no-unused-vars": 'off'
"@typescript-eslint/no-parameter-properties": 'off'
"@typescript-eslint/no-angle-bracket-type-assertion" : 'off'
"require-atomic-updates" : 'off'
'@typescript-eslint/consistent-type-assertions' :
- error
- assertionStyle: 'angle-bracket'
"@typescript-eslint/array-type":
- error
- default: generic
indent:
- warn
- 2
- SwitchCase : 1
"@typescript-eslint/indent":
- 0
- 2
no-undef: 'off'
no-unused-vars: 'off'
linebreak-style:
- 'error'
- unix
quotes:
- error
- single
semi:
- error
- always
no-multiple-empty-lines:
- error
- max: 2
maxBOF: 0
maxEOF: 1
"@typescript-eslint/no-this-alias": "off"
"@typescript-eslint/interface-name-prefix": "off"
"@typescript-eslint/explicit-function-return-type": "off"
"@typescript-eslint/no-explicit-any": "off"
"@typescript-eslint/no-empty-interface": "off"
"@typescript-eslint/no-namespace": "off"
"@typescript-eslint/explicit-member-accessibility": "off"
"@typescript-eslint/no-unused-vars": "off"
"@typescript-eslint/no-parameter-properties": "off"
"@typescript-eslint/no-angle-bracket-type-assertion": "off"
"require-atomic-updates": "off"
"@typescript-eslint/consistent-type-assertions":
- warn
- assertionStyle: "angle-bracket"
"@typescript-eslint/array-type":
- warn
- default: generic
no-undef: "off"
no-unused-vars: "off"
linebreak-style:
- "warn"
- unix
semi:
- warn
- always
no-multiple-empty-lines:
- warn
- max: 2
maxBOF: 0
maxEOF: 1

331
.prettierignore Normal file
Просмотреть файл

@ -0,0 +1,331 @@
#-------------------------------------------------------------------------------------------------------------------
# Keep this section in sync with .gitignore
#-------------------------------------------------------------------------------------------------------------------
## Ignore generated code
PackageTest/NugetPackageTest/Generated
src/generator/AutoRest.NodeJS.Tests/AcceptanceTests/*.js
## Ignore user-specific files, temporary files, build results, etc.
compare-results/*
# User-specific files
*.suo
*.user
*.sln.docstates
.vs
launchSettings.json
# Build results
binaries/
[Dd]ebug*/
[Rr]elease/
[Tt]est[Rr]esult*
[Bb]uild[Ll]og.*
[Bb]uild.out
*_i.c
*_p.c
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.vspscc
*.vssscc
.builds
*.pidb
*.log*
*.scc
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
# Visual Studio profiler
*.psess
*.vsp
# VS Code settings
*.vscode
# Code analysis
*.CodeAnalysisLog.xml
# Guidance Automation Toolkit
*.gpState
# ReSharper is a Visual Studio add-in
_ReSharper*/
*.[Rr]e[Ss]harper
# NCrunch
*.ncrunch*
.*crunch*.local.xml
# Installshield output folder
[Ee]xpress
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish
# Publish Web Output
*.[Pp]ublish.xml
# Others
[Bb]in
[Oo]bj
sql
*.Cache
ClientBin
[Ss]tyle[Cc]op.*
~$*
*.dbmdl
# Build tasks
[Tt]ools/*.dll
*.class
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.jar
*.war
*.ear
# Azure Tooling #
node_modules
.ntvs_analysis.dat
# Eclipse #
*.pydevproject
.project
.metadata
bin/**
tmp/**
tmp/**/*
*.bak
*.swp
*~.nib
local.properties
.classpath
.settings/
.loadpath
# Xamarin #
*.userprefs
# Other Tooling #
.classpath
.project
target
build
reports
.gradle
.idea
*.iml
Tools/7-Zip
.gitrevision
# Sensitive files
*.keys
*.pfx
*.cer
*.pem
*.jks
# Backup & report files from converting a project to a new version of VS.
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
# NuGet
packages
# Mac OS #
.DS_Store
.DS_Store?
# Windows #
Thumbs.db
# Mono
*dll.mdb
*exe.mdb
#old nuget restore folder
.nuget/
src/generator/AutoRest.Ruby*Tests/Gemfile.lock
src/generator/AutoRest.Ruby*/*/RspecTests/Generated/*
#netcore
/NetCore
*.lock.json
#dnx installation
dnx-clr-win-x86*/
dnx-coreclr-win-x86*/
/dnx
# Gemfile.lock
Gemfile.lock
# go ignore
src/generator/AutoRest.Go.Tests/pkg/*
src/generator/AutoRest.Go.Tests/bin/*
src/generator/AutoRest.Go.Tests/src/github.com/*
src/generator/AutoRest.Go.Tests/src/tests/generated/*
src/generator/AutoRest.Go.Tests/src/tests/vendor/*
src/generator/AutoRest.Go.Tests/src/tests/glide.lock
autorest/**/*.js
core/**/*.js
*.js.map
# backup files
*~
#client runtime
src/client/**/*
src/extension/old/**/*
*.d.ts
src/bootstrapper
src/extension/out
src/next-gen
package/nuget/tools
package/chocolatey/*.nupkg
Samples/**/*.map
# npm (we do want to test for most recent versions)
**/package-lock.json
**/dist/
src/*/nm
/nm/
*.tgz
# Logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Runtime data
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# nyc test coverage
.nyc_output
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
# next.js build output
.next
# Common toolchain intermediate files
temp
# Rush files
common/temp/**
package-deps.json
common/config/rush/shrinkwrap.yaml
# Code generation output for regression tests
core/test/regression
#-------------------------------------------------------------------------------------------------------------------
# Prettier-specific overrides
#-------------------------------------------------------------------------------------------------------------------
# Rush files
common/changes/
common/scripts/
common/config/
CHANGELOG.*
# Package manager files
pnpm-lock.yaml
yarn.lock
package-lock.json
shrinkwrap.json
# Build outputs
dist
lib
# Prettier reformats code blocks inside Markdown, which affects rendered output
*.md
schema/
Samples/
modelerfour/test/resources/
modelerfour/test/scenarios/
modelerfour/test/errors/

5
.prettierrc.yml Normal file
Просмотреть файл

@ -0,0 +1,5 @@
trailingComma: "all"
printWidth: 120
quoteProps: "consistent"
endOfLine: "auto"
arrowParens: always

24
.vscode/settings.json поставляемый
Просмотреть файл

@ -23,11 +23,11 @@
"**/obj/**": true,
"**/bin/**": true
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"editor.tabSize": 2,
"editor.detectIndentation": false,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.formatOnSave": true,
@ -47,18 +47,10 @@
"command-line.json": "jsonc",
"common-versions.json": "jsonc"
},
"eslint.autoFixOnSave": true,
"eslint.validate": [
"javascript",
{
"language": "typescript",
"autoFix": true
},
{
"language": "typescriptreact",
"autoFix": false
}
],
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"eslint.workingDirectories": [
{
"changeProcessCWD": true,

Просмотреть файл

@ -13,8 +13,8 @@
"scripts": {
"start": "node --max_old_space_size=4096 ./entrypoints/main.js",
"debug": "node --max_old_space_size=4096 --inspect-brk=localhost:9229 ./entrypoints/main.js",
"eslint-fix": "eslint . --fix --ext .ts",
"eslint": "eslint . --ext .ts",
"fix": "eslint . --fix --ext .ts",
"lint": "eslint . --ext .ts --max-warnings=0",
"static-link": "static-link --no-node-modules --debug",
"watch": "tsc -p . --watch",
"build": "tsc -p .",
@ -80,5 +80,8 @@
"recursive-diff": "~1.0.6"
}
},
"dependencies": {}
"dependencies": {
"prettier": "~2.2.1",
"eslint-plugin-prettier": "~3.2.0"
}
}