repo setup
This commit is contained in:
commit
2f2db1aab8
|
@ -0,0 +1,7 @@
|
|||
root = true
|
||||
|
||||
[*]
|
||||
indent_size = 2
|
||||
indent_style = space
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
|
@ -0,0 +1,68 @@
|
|||
module.exports = {
|
||||
env: {
|
||||
browser: true,
|
||||
},
|
||||
extends: ['airbnb-base', 'plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended'],
|
||||
ignorePatterns: ['lib/*', '/*.js', '/*.ts'],
|
||||
parser: '@typescript-eslint/parser',
|
||||
parserOptions: {
|
||||
project: './tsconfig.json',
|
||||
tsconfigRootDir: './',
|
||||
},
|
||||
settings: {
|
||||
'import/resolver': {
|
||||
typescript: {
|
||||
project: './tsconfig.json',
|
||||
},
|
||||
},
|
||||
},
|
||||
plugins: ['@typescript-eslint', 'import', 'prettier'],
|
||||
rules: {
|
||||
'no-underscore-dangle': 'off',
|
||||
'@typescript-eslint/no-explicit-any': 'off',
|
||||
'no-console': 'off',
|
||||
'@typescript-eslint/no-this-alias': 'off',
|
||||
'import/prefer-default-export': 'off',
|
||||
'@typescript-eslint/no-empty-function': 'off',
|
||||
'no-shadow': 'off',
|
||||
'@typescript-eslint/no-shadow': ['error'],
|
||||
'no-restricted-syntax': 'off',
|
||||
'import/no-unresolved': ['error', { ignore: ['^virtual:'] }],
|
||||
'consistent-return': 'off',
|
||||
'no-continue': 'off',
|
||||
'no-eval': 'off',
|
||||
'no-await-in-loop': 'off',
|
||||
'no-nested-ternary': 'off',
|
||||
'prefer-destructuring': 'off',
|
||||
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
|
||||
'import/extensions': [
|
||||
'error',
|
||||
'ignorePackages',
|
||||
{
|
||||
ts: 'never',
|
||||
tsx: 'never',
|
||||
},
|
||||
],
|
||||
'import/order': [
|
||||
'error',
|
||||
{
|
||||
groups: ['builtin', 'external', 'internal', ['sibling', 'parent'], 'index', 'unknown'],
|
||||
'newlines-between': 'always',
|
||||
alphabetize: {
|
||||
order: 'asc',
|
||||
caseInsensitive: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
'sort-imports': [
|
||||
'error',
|
||||
{
|
||||
ignoreCase: false,
|
||||
ignoreDeclarationSort: true,
|
||||
ignoreMemberSort: false,
|
||||
memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'],
|
||||
allowSeparatedGroups: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
|
@ -0,0 +1 @@
|
|||
* text=auto eol=lf
|
|
@ -0,0 +1,2 @@
|
|||
node_modules/
|
||||
/lib
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"printWidth": 120,
|
||||
"trailingComma": "all",
|
||||
"singleQuote": true
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"recommendations": ["dbaeumer.vscode-eslint", "editorconfig.editorconfig"]
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"editor.formatOnSave": true,
|
||||
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
|
||||
"eslint.format.enable": true
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,59 @@
|
|||
{
|
||||
"name": "providers",
|
||||
"version": "0.0.1",
|
||||
"description": "Package that contains all the providers of movie-web",
|
||||
"main": "./lib/providers.umd.cjs",
|
||||
"types": "./lib/providers.d.ts",
|
||||
"files": [
|
||||
"./lib"
|
||||
],
|
||||
"exports": {
|
||||
".": {
|
||||
"import": "./lib/providers.js",
|
||||
"require": "./lib/providers.umd.cjs"
|
||||
}
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/movie-web/providers.git"
|
||||
},
|
||||
"keywords": [
|
||||
"movie-web",
|
||||
"providers"
|
||||
],
|
||||
"author": "movie-web",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/movie-web/providers/issues"
|
||||
},
|
||||
"homepage": "https://github.com/movie-web/providers#readme",
|
||||
"scripts": {
|
||||
"build": "vite build",
|
||||
"test": "vitest run",
|
||||
"test:watch": "vitest",
|
||||
"lint": "eslint --ext .ts,.js src/",
|
||||
"lint:fix": "eslint --fix --ext .ts,.js src/",
|
||||
"lint:report": "eslint --ext .ts,.js --output-file eslint_report.json --format json src/",
|
||||
"prepare": "npm run build",
|
||||
"prepublishOnly": "npm test && npm run lint"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@typescript-eslint/eslint-plugin": "^5.60.0",
|
||||
"@typescript-eslint/parser": "^5.60.0",
|
||||
"eslint": "^8.30.0",
|
||||
"eslint-config-airbnb-base": "^15.0.0",
|
||||
"eslint-config-prettier": "^8.5.0",
|
||||
"eslint-import-resolver-typescript": "^3.5.5",
|
||||
"eslint-plugin-import": "^2.27.5",
|
||||
"eslint-plugin-prettier": "^4.2.1",
|
||||
"prettier": "^2.6.2",
|
||||
"tsc-alias": "^1.6.7",
|
||||
"tslint": "^6.1.3",
|
||||
"tslint-config-prettier": "^1.18.0",
|
||||
"typescript": "^4.6.3",
|
||||
"vite": "^4.0.0",
|
||||
"vite-plugin-dts": "^2.3.0",
|
||||
"vite-plugin-eslint": "^1.8.1",
|
||||
"vitest": "^0.32.2"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
import { LOG } from '@/testing/oof';
|
||||
|
||||
describe('oof.ts', () => {
|
||||
it('should contain hello', () => {
|
||||
expect(LOG).toContain('hello');
|
||||
});
|
||||
});
|
|
@ -0,0 +1,5 @@
|
|||
import { LOG } from '@/testing/oof';
|
||||
|
||||
export function test() {
|
||||
console.log(LOG);
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
export const LOG = 'hello world';
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"target": "es2018",
|
||||
"lib": ["es2018", "DOM"],
|
||||
"module": "commonjs",
|
||||
"declaration": true,
|
||||
"outDir": "./lib",
|
||||
"strict": true,
|
||||
"baseUrl": "src",
|
||||
"experimentalDecorators": true,
|
||||
"isolatedModules": false,
|
||||
"paths": {
|
||||
"@/*": ["./*"]
|
||||
},
|
||||
"types": ["vitest/globals"]
|
||||
},
|
||||
"include": ["src"],
|
||||
"exclude": ["node_modules", "**/__tests__/*"]
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"extends": ["tslint:recommended", "tslint-config-prettier"]
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
const path = require('path');
|
||||
const { defineConfig } = require('vitest/config');
|
||||
const { default: eslint } = require('vite-plugin-eslint');
|
||||
const dts = require('vite-plugin-dts');
|
||||
|
||||
module.exports = defineConfig({
|
||||
plugins: [eslint(), dts()],
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': path.resolve(__dirname, './src'),
|
||||
},
|
||||
},
|
||||
build: {
|
||||
outDir: 'lib',
|
||||
lib: {
|
||||
entry: path.resolve(__dirname, 'src/index.ts'),
|
||||
name: 'providers',
|
||||
fileName: 'providers',
|
||||
},
|
||||
},
|
||||
test: {
|
||||
globals: true,
|
||||
},
|
||||
});
|
Loading…
Reference in New Issue