Merge branch 'main' into feature/fsd-structure
This commit is contained in:
@@ -63,6 +63,7 @@ export function buildPlugins({
|
||||
plugins.push(
|
||||
new BundleAnalyzerPlugin({
|
||||
openAnalyzer: false,
|
||||
analyzerMode: 'static',
|
||||
})
|
||||
)
|
||||
plugins.push(new ReactRefreshWebpackPlugin({ overlay: false }))
|
||||
|
||||
@@ -31,6 +31,8 @@ export function buildResolvers(options: BuildOptions): webpack.ResolveOptions {
|
||||
preferAbsolute: true,
|
||||
modules: [options.paths.src, 'node_modules'],
|
||||
mainFiles: ['index'],
|
||||
alias: {},
|
||||
alias: {
|
||||
'@': options.paths.src,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ import MiniCssExtractPlugin from 'mini-css-extract-plugin'
|
||||
*/
|
||||
export const buildCssLoader = (isDev: boolean) => {
|
||||
const cssLoader = {
|
||||
test: /\.s[ac]ss$/i,
|
||||
test: /\.(s[ac]ss|css)$/i,
|
||||
use: [
|
||||
// Создает <style> теги из JS строк (dev) или извлекает в файлы (prod)
|
||||
isDev ? 'style-loader' : MiniCssExtractPlugin.loader,
|
||||
@@ -28,6 +28,7 @@ export const buildCssLoader = (isDev: boolean) => {
|
||||
options: {
|
||||
modules: {
|
||||
auto: /\.module\..*$/,
|
||||
namedExport: false,
|
||||
localIdentName: isDev
|
||||
? '[path][name]__[local]--[hash:base64:5]'
|
||||
: '[hash:base64:8]',
|
||||
|
||||
@@ -116,6 +116,7 @@ export default [
|
||||
'internal',
|
||||
['sibling', 'parent'],
|
||||
'index',
|
||||
'type',
|
||||
],
|
||||
pathGroups: [
|
||||
{
|
||||
@@ -124,12 +125,13 @@ export default [
|
||||
position: 'before',
|
||||
},
|
||||
{
|
||||
pattern: '@src/**',
|
||||
pattern: '@/**',
|
||||
group: 'internal',
|
||||
},
|
||||
],
|
||||
pathGroupsExcludedImportTypes: ['internal', 'react'],
|
||||
pathGroupsExcludedImportTypes: ['type'],
|
||||
'newlines-between': 'always',
|
||||
distinctGroup: false,
|
||||
alphabetize: {
|
||||
order: 'asc',
|
||||
caseInsensitive: true,
|
||||
@@ -189,7 +191,17 @@ export default [
|
||||
'@typescript-eslint/no-unused-vars': 'warn',
|
||||
'@typescript-eslint/no-var-requires': 'warn',
|
||||
'@typescript-eslint/no-use-before-define': ['error', { enums: false }],
|
||||
'@typescript-eslint/naming-convention': 'warn',
|
||||
'@typescript-eslint/naming-convention': [
|
||||
'warn',
|
||||
{
|
||||
selector: 'function',
|
||||
format: ['camelCase', 'PascalCase'],
|
||||
},
|
||||
{
|
||||
selector: 'variable',
|
||||
format: ['camelCase', 'UPPER_CASE', 'PascalCase'],
|
||||
},
|
||||
],
|
||||
'@typescript-eslint/ban-ts-comment': 'warn',
|
||||
|
||||
/**
|
||||
|
||||
@@ -52,5 +52,6 @@ module.exports = {
|
||||
'order/order': selectorOrdering,
|
||||
'order/properties-order': propertyOrdering,
|
||||
'declaration-empty-line-before': null,
|
||||
'no-descending-specificity': null, // Отключаем из-за конфликта с order/order
|
||||
},
|
||||
}
|
||||
|
||||
@@ -11,6 +11,9 @@
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"@/*": [
|
||||
"./src/*"
|
||||
],
|
||||
"*": [
|
||||
"./src/*"
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user