added tooling (eslint, typescript and prettier)
This commit is contained in:
28
tooling/prettier/index.mjs
Normal file
28
tooling/prettier/index.mjs
Normal file
@@ -0,0 +1,28 @@
|
||||
/** @typedef {import("prettier").Config} PrettierConfig */
|
||||
/** @typedef {import("@ianvs/prettier-plugin-sort-imports").PluginConfig} SortImportsConfig */
|
||||
|
||||
/** @type { PrettierConfig | SortImportsConfig } */
|
||||
const config = {
|
||||
plugins: [
|
||||
'@ianvs/prettier-plugin-sort-imports',
|
||||
],
|
||||
importOrder: [
|
||||
'^(react/(.*)$)|^(react$)|^(react-native(.*)$)',
|
||||
'<THIRD_PARTY_MODULES>',
|
||||
'',
|
||||
'^@mixan/(.*)$',
|
||||
'',
|
||||
'^~/',
|
||||
'^[../]',
|
||||
'^[./]',
|
||||
],
|
||||
importOrderParserPlugins: ['typescript', 'jsx', 'decorators-legacy'],
|
||||
importOrderTypeScriptVersion: '4.4.0',
|
||||
singleQuote: true,
|
||||
semi: true,
|
||||
trailingComma: 'es5',
|
||||
printWidth: 80,
|
||||
tabWidth: 2,
|
||||
};
|
||||
|
||||
export default config;
|
||||
17
tooling/prettier/package.json
Normal file
17
tooling/prettier/package.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"name": "@mixan/prettier-config",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"main": "index.mjs",
|
||||
"scripts": {
|
||||
"clean": "rm -rf .turbo node_modules"
|
||||
},
|
||||
"dependencies": {
|
||||
"@ianvs/prettier-plugin-sort-imports": "^4.1.0",
|
||||
"prettier": "^3.0.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@mixan/tsconfig": "workspace:*",
|
||||
"typescript": "^5.2.0"
|
||||
}
|
||||
}
|
||||
8
tooling/prettier/tsconfig.json
Normal file
8
tooling/prettier/tsconfig.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"extends": "@mixan/tsconfig/base.json",
|
||||
"compilerOptions": {
|
||||
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json"
|
||||
},
|
||||
"include": ["."],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
Reference in New Issue
Block a user