mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-10 19:52:53 +00:00
Initial commit
This commit is contained in:
15
.editorconfig
Normal file
15
.editorconfig
Normal file
@@ -0,0 +1,15 @@
|
||||
# editorconfig.org
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
91
.gitignore
vendored
Normal file
91
.gitignore
vendored
Normal file
@@ -0,0 +1,91 @@
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# Runtime data
|
||||
pids
|
||||
*.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 (https://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/
|
||||
|
||||
# TypeScript v1 declaration files
|
||||
typings/
|
||||
|
||||
# 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
|
||||
|
||||
# parcel-bundler cache (https://parceljs.org/)
|
||||
.cache
|
||||
|
||||
# next.js build output
|
||||
.next
|
||||
|
||||
# nuxt.js build output
|
||||
.nuxt
|
||||
|
||||
# vuepress build output
|
||||
.vuepress/dist
|
||||
|
||||
# Serverless directories
|
||||
.serverless/
|
||||
|
||||
# FuseBox cache
|
||||
.fusebox/
|
||||
|
||||
#DynamoDB Local files
|
||||
.dynamodb/
|
||||
|
||||
########## end of https://github.com/github/gitignore/blob/master/Node.gitignore
|
||||
|
||||
# ignore ide files
|
||||
.idea
|
||||
.vscode
|
||||
|
||||
# ignore lib
|
||||
lib
|
||||
|
||||
# ignore docs
|
||||
docs
|
||||
17
.npmignore
Normal file
17
.npmignore
Normal file
@@ -0,0 +1,17 @@
|
||||
# Ignore all files/folders by default
|
||||
# See https://stackoverflow.com/a/29932318
|
||||
/*
|
||||
# Except these files/folders
|
||||
!.editorconfig
|
||||
!.gitignore
|
||||
!.npmignore
|
||||
!lib
|
||||
lib/tsconfig.tsbuildinfo
|
||||
!LICENSE
|
||||
!package.json
|
||||
!package-lock.json
|
||||
!README.md
|
||||
!scripts
|
||||
!templates
|
||||
!tsconfig.json
|
||||
!tslint.json
|
||||
34
README.md
Normal file
34
README.md
Normal file
@@ -0,0 +1,34 @@
|
||||
# @openstapps/eslint-config
|
||||
|
||||
[](https://gitlab.com/openstapps/eslint-config/commits/master)
|
||||
[](https://npmjs.com/package/@openstapps/eslint-config)
|
||||
[](https://www.gnu.org/licenses/gpl-3.0.en.html)
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
Unfortunately, ESLint requires you to define plugins and configs
|
||||
your config depends on as `peerDependencies`, which means they
|
||||
have to be installed manually.
|
||||
|
||||
Use the command
|
||||
|
||||
```shell
|
||||
npx install-peerdeps --dev @openstapps/eslint-config
|
||||
```
|
||||
|
||||
Add either the following to your `package.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"devDependencies": {
|
||||
"eslint": ">=8.11.0",
|
||||
"eslint-config-prettier": ">=8.5.0",
|
||||
"eslint-plugin-jsdoc": ">=38.0.6",
|
||||
"eslint-plugin-prettier": ">=4.0.0",
|
||||
"eslint-plugin-unicorn": ">=41.0.1",
|
||||
"prettier": ">=2.6.0",
|
||||
"@typescript-eslint/eslint-plugin": ">=5.15.0"
|
||||
}
|
||||
}
|
||||
```
|
||||
89
index.js
Normal file
89
index.js
Normal file
@@ -0,0 +1,89 @@
|
||||
module.exports = {
|
||||
root: true,
|
||||
ignorePatterns: ['projects/**/*'],
|
||||
overrides: [
|
||||
{
|
||||
files: ['*.ts'],
|
||||
parser: '@typescript-eslint/parser',
|
||||
parserOptions: {
|
||||
ecmaVersion: 2020,
|
||||
sourceType: 'module',
|
||||
project: ['tsconfig.json'],
|
||||
createDefaultProgram: true,
|
||||
},
|
||||
extends: [
|
||||
'plugin:@typescript-eslint/recommended',
|
||||
'plugin:prettier/recommended',
|
||||
'plugin:prettier/recommended',
|
||||
'plugin:jsdoc/recommended',
|
||||
'plugin:unicorn/recommended',
|
||||
],
|
||||
plugins: ['eslint-plugin-unicorn', 'eslint-plugin-jsdoc', 'prettier'],
|
||||
settings: {
|
||||
jsdoc: {
|
||||
mode: 'typescript',
|
||||
},
|
||||
},
|
||||
rules: {
|
||||
'unicorn/filename-case': 'error',
|
||||
'unicorn/no-array-callback-reference': 'off',
|
||||
'unicorn/no-useless-undefined': 'off',
|
||||
'unicorn/prefer-node-protocol': 'off',
|
||||
'unicorn/no-process-exit': 'off',
|
||||
'unicorn/prevent-abbreviations': [
|
||||
'error',
|
||||
{
|
||||
replacements: {
|
||||
ref: false,
|
||||
i: false,
|
||||
},
|
||||
},
|
||||
],
|
||||
'unicorn/no-nested-ternary': 'off',
|
||||
'unicorn/better-regex': 'off',
|
||||
|
||||
'jsdoc/no-types': 'error',
|
||||
'jsdoc/require-param': 'off',
|
||||
'jsdoc/require-param-description': 'error',
|
||||
'jsdoc/check-param-names': 'error',
|
||||
'jsdoc/require-returns': 'off',
|
||||
'jsdoc/require-param-type': 'off',
|
||||
'jsdoc/require-returns-type': 'off',
|
||||
'jsdoc/check-tag-names': [
|
||||
'error',
|
||||
{
|
||||
definedTags: ['internal'],
|
||||
},
|
||||
],
|
||||
|
||||
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
||||
'@typescript-eslint/no-unused-vars': [
|
||||
'error',
|
||||
{
|
||||
args: 'after-used',
|
||||
argsIgnorePattern: '^_',
|
||||
},
|
||||
],
|
||||
'@typescript-eslint/lines-between-class-members': ['error', 'always'],
|
||||
'@typescript-eslint/no-explicit-any': 'error',
|
||||
'@typescript-eslint/no-non-null-assertion': 'off',
|
||||
|
||||
'prettier/prettier': [
|
||||
'error',
|
||||
{
|
||||
tabWidth: 2,
|
||||
printWidth: 110,
|
||||
useTabs: false,
|
||||
semi: true,
|
||||
singleQuote: true,
|
||||
quoteProps: 'consistent',
|
||||
trailingComma: 'all',
|
||||
bracketSpacing: false,
|
||||
arrowParens: 'avoid',
|
||||
endOfLine: 'lf',
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
1808
package-lock.json
generated
Normal file
1808
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
39
package.json
Normal file
39
package.json
Normal file
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"name": "@openstapps/eslint-config",
|
||||
"version": "0.0.1",
|
||||
"main": "index.js",
|
||||
"description": "A collection of configuration base files for StApps projects.",
|
||||
"scripts": {
|
||||
"build": "npm run lint && npm run compile",
|
||||
"compile": "rimraf lib && tsc --outDir lib && prepend lib/cli.js '#!/usr/bin/env node\n'",
|
||||
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0 && git add CHANGELOG.md && git commit -m 'docs: update changelog'",
|
||||
"prepublishOnly": "npm ci && npm run build",
|
||||
"postversion": "npm run changelog",
|
||||
"preversion": "npm run prepublishOnly",
|
||||
"push": "git push && git push origin \"v$npm_package_version\""
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git@gitlab.com:openstapps/eslint-config.git"
|
||||
},
|
||||
"author": "Thea Schöbl",
|
||||
"license": "GPL-3.0-only",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/parser": ">=5.15.0",
|
||||
"typescript": "4.4.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"conventional-changelog-cli": "2.1.1",
|
||||
"prepend-file-cli": "1.0.6",
|
||||
"rimraf": "3.0.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"eslint": ">=8.11.0",
|
||||
"eslint-config-prettier": ">=8.5.0",
|
||||
"eslint-plugin-jsdoc": ">=38.0.6",
|
||||
"eslint-plugin-prettier": ">=4.0.0",
|
||||
"eslint-plugin-unicorn": ">=41.0.1",
|
||||
"prettier": ">=2.6.0",
|
||||
"@typescript-eslint/eslint-plugin": ">=5.15.0"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user