feat(utils-lib): creation of the io-projects eslint package
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Jérémi N ‘EndMove’ 2023-04-12 20:42:47 +02:00
parent 68834acfbb
commit 7a307b4570
Signed by: EndMove
GPG Key ID: 65C4A02E1F5371A4
8 changed files with 2961 additions and 0 deletions

26
.drone.yml Normal file
View File

@ -0,0 +1,26 @@
---
kind: pipeline
type: docker
name: npm-publish-snapshot
trigger:
event:
- push
steps:
- name: publish-snapshot
image: node:18
environment:
GITEA_TOKEN:
from_secret: gitea_token
commands:
- VERSION=$(cat VERSION 2>/dev/null) || echo "1.0.0"
- SNAPSHOT=${VERSION}-snapshot.${DRONE_BUILD_NUMBER}
- echo "Current version=${VERSION}"
- echo "Snapshot version=${SNAPSHOT}"
- npm config set @ioprojects:registry https://git.endmove.eu/api/packages/io-projectsofficial/npm/
- npm config set -- '//git.endmove.eu/api/packages/io-projectsofficial/npm/:_authToken' "${GITEA_TOKEN}"
- npm ci
- npm version ${SNAPSHOT}
- npm publish
- npm dist-tag add @ioprojects/ui-eslint-base@${SNAPSHOT} snapshot

20
.editorconfig Normal file
View File

@ -0,0 +1,20 @@
root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
max_line_length = 120
[*.md]
trim_trailing_whitespace = false
max_line_length = 0
[VERSION]
insert_final_newline = false
[LICENSE]
insert_final_newline = false

132
.eslintrc.json Normal file
View File

@ -0,0 +1,132 @@
{
"root": true,
"env": {
"browser": true,
"es2021": true,
"jest": true
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": "latest",
"sourceType": "module"
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended"
],
"plugins": [
"jest",
"cypress",
"import",
"@typescript-eslint",
"prettier"
],
"overrides": [
{
"files": ["test/**"],
"plugins": ["jest"],
"extends": ["plugin:jest/recommended", "plugin:jest/style"],
"rules": { "jest/prefer-expect-assertions": "off" }
},
{
"files": ["*.ts", "*.tsx"],
"plugins": [
"@typescript-eslint"
],
"rules": {
"no-var": "error",
"no-dupe-class-members": "off",
"no-undef": "off",
"no-redeclare": "off",
"@typescript-eslint/no-redeclare": ["warn"],
"@typescript-eslint/consistent-type-assertions": ["warn"],
"no-array-constructor": "off",
"@typescript-eslint/no-array-constructor": ["warn"],
"no-use-before-define": "off",
"@typescript-eslint/no-use-before-define": [
"warn",
{
"functions": false,
"classes": false,
"variables": false,
"typedefs": false
}
],
"no-unused-expressions": "off",
"@typescript-eslint/no-unused-expressions": [
"error",
{
"allowShortCircuit": true,
"allowTernary": true,
"allowTaggedTemplates": true
}
],
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
{
"args": "none",
"ignoreRestSiblings": true
}
],
"no-useless-constructor": "off",
"@typescript-eslint/no-useless-constructor": ["warn"]
}
},
{
"files": ["cypress/e2e/**/*.cy.ts"],
"extends": ["plugin:cypress/recommended"],
"rules": {
"@typescript-eslint/no-unused-expressions": "off",
"@typescript-eslint/no-empty-function": "off",
"spaced-comment": "off",
"camelcase": "off"
}
}
],
"rules": {
"no-undef-init": "warn",
"no-useless-return": "warn",
"no-duplicate-imports": "warn",
"import/first": "warn",
"import/no-anonymous-default-export": [
"warn",
{
"allowArray": true,
"allowLiteral": true,
"allowObject": true
}
],
"prefer-const": "warn",
"prefer-spread": "warn",
"camelcase": "error",
"spaced-comment": "error",
"dot-notation": "warn",
"quotes": ["error", "single"],
"prettier/prettier": [
"error",
{
"printWidth": 120,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": true,
"endOfLine": "auto",
"jsxSingleQuote": false,
"bracketSpacing": true,
"bracketSameLine": false,
"arrowParens": "always"
}
]
},
"settings": {
"import/resolver": {
"typescript": {}
}
}
}

144
.gitignore vendored Normal file
View File

@ -0,0 +1,144 @@
# Created by https://www.toptal.com/developers/gitignore/api/node
# Edit at https://www.toptal.com/developers/gitignore?templates=node
### Node ###
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
# 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
*.lcov
# 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/
# Snowpack dependency directory (https://snowpack.dev/)
web_modules/
# TypeScript cache
*.tsbuildinfo
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional stylelint cache
.stylelintcache
# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local
# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache
# Next.js build output
.next
out
# Nuxt.js build / generate output
.nuxt
dist
# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public
# vuepress build output
.vuepress/dist
# vuepress v2.x temp and cache directory
.temp
# Docusaurus cache and generated files
.docusaurus
# Serverless directories
.serverless/
# FuseBox cache
.fusebox/
# DynamoDB Local files
.dynamodb/
# TernJS port file
.tern-port
# Stores VSCode versions used for testing VSCode extensions
.vscode-test
# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
### Node Patch ###
# Serverless Webpack directories
.webpack/
# Optional stylelint cache
# SvelteKit build / generate output
.svelte-kit
# End of https://www.toptal.com/developers/gitignore/api/node

View File

@ -0,0 +1 @@
© Copyright 2023 IO-Projects, all rights reserved.

1
VERSION Normal file
View File

@ -0,0 +1 @@
1.0.0

2607
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

30
package.json Normal file
View File

@ -0,0 +1,30 @@
{
"name": "@ioprojects/ui-eslint-base",
"version": "1.0.0",
"description": "NPM package for ESLINT configuration of IO-Projects TypeScript front-end projects",
"main": ".eslintrc.json",
"files": [
".eslintrc.json"
],
"dependencies": {
"@typescript-eslint/eslint-plugin": "^5.58.0",
"@typescript-eslint/parser": "^5.58.0",
"eslint": "^8.38.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-cypress": "^2.13.2",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jest": "^27.2.1",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-vue": "^9.10.0"
},
"repository": {
"type": "git",
"url": "https://git.endmove.eu/IO-ProjectsOfficial/ioprojects-ui-eslint.git"
},
"keywords": [
"io-project",
"eslint"
],
"author": "IO-Projects <contact@io-projects.com>",
"license": "SEE LICENSE IN THE LICENSE FILE"
}