Skip to content

Commit e3ffee0

Browse files
committed
feature: @putout/plugin-assignment: add
1 parent a5615c6 commit e3ffee0

File tree

100 files changed

+426
-892
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+426
-892
lines changed

README.md

Lines changed: 1 addition & 5 deletions

packages/eslint-plugin-putout/.madrun.mjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ const MOCHA_TIMEOUT = 20_000;
55

66
const env = {
77
SUPERTAPE_LOAD_LOOP_TIMEOUT,
8+
SUPERTAPE_PROGRESS_BAR_MIN: 10,
89
};
910

1011
const lintEnv = {
@@ -13,9 +14,9 @@ const lintEnv = {
1314

1415
export default {
1516
'wisdom': () => run(['lint:all', 'coverage']),
16-
'test': () => `tape 'test/**/*.mjs' 'lib/config/*.spec.*'`,
17+
'test': () => [env, `tape 'test/**/*.mjs' 'lib/config/*.spec.*'`],
1718
'test:all': () => [env, `mocha --timeout ${MOCHA_TIMEOUT} 'test/**/*.mjs' 'lib/putout/*.spec.js' 'lib/**/*.spec.js'`],
18-
'watch:test': async () => `nodemon -w rules -x "${await run('test')}"`,
19+
'watch:test': async () => [env, `nodemon -w rules -x "${await cutEnv('test')}"`],
1920
'lint': () => 'putout .',
2021
'lint:all': () => run(['lint', 'lint:safe']),
2122
'lint:safe': () => [lintEnv, 'putout eslint-fixture'],

packages/eslint-plugin-putout/lib/putout/index.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ parserTester.run('putout', rule, {
248248
code: `a = is() ? a : b`,
249249
options: [{
250250
rules: {
251-
'convert-assignment-to-declaration': 'off',
251+
'assignment/convert-to-declaration': 'off',
252252
},
253253
}],
254254
output: montag`

packages/plugin-convert-assignment-to-arrow-function/.gitignore renamed to packages/plugin-assignment/.gitignore

File renamed without changes.

packages/plugin-convert-assignment-to-arrow-function/.madrun.mjs renamed to packages/plugin-assignment/.madrun.mjs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import {run} from 'madrun';
22

33
export default {
4-
'test': () => `tape 'test/*.js'`,
5-
'watch:test': async () => `nodemon -w lib -w test -x "${await run('test')}"`,
6-
'lint': () => `putout .`,
4+
'prepublishOnly': () => run(['lint', 'test']),
5+
'test': () => `tape 'test/*.js' 'lib/**/*.spec.js'`,
6+
'watch:test': async () => `nodemon -w lib -x "${await run('test')}"`,
7+
'lint': () => 'putout .',
78
'fresh:lint': () => run('lint', '--fresh'),
89
'lint:fresh': () => run('lint', '--fresh'),
910
'fix:lint': () => run('lint', '--fix'),

packages/plugin-convert-assignment-to-declaration/.npmignore renamed to packages/plugin-assignment/.npmignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
.*
2+
*.spec.js
23
test
4+
fixture
35
yarn-error.log
46

57
coverage

packages/plugin-convert-assignment-to-arrow-function/.nycrc.json renamed to packages/plugin-assignment/.nycrc.json

File renamed without changes.

packages/plugin-convert-assignment-to-arrow-function/LICENSE renamed to packages/plugin-assignment/LICENSE

File renamed without changes.
Lines changed: 139 additions & 0 deletions
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import {matchToFlat} from '@putout/eslint-flat';
2+
import {safeAlign} from 'eslint-plugin-putout';
3+
import {defineConfig} from 'eslint/config';
4+
5+
export const match = {
6+
'*.md{js}': {
7+
'n/no-deprecated-api': 'off',
8+
'n/no-unsupported-features/node-builtins': 'off',
9+
},
10+
};
11+
12+
export default defineConfig([
13+
matchToFlat(match),
14+
safeAlign, {
15+
rules: {
16+
'no-useless-return': 'off',
17+
},
18+
},
19+
]);

0 commit comments

Comments
 (0)