# no-non-function-verb-prefix πŸ“ Disallow non-function values with function-style verb prefixes. πŸ’ΌπŸš« This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the β˜‘οΈ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). πŸ’­ This rule requires [type information](https://typescript-eslint.io/linting/typed-linting). Names that start with function-style verbs like `get`, `set`, or `create` imply that the value is callable or constructable. This rule reports TypeScript bindings where the name starts with a configured verb but the non-nullish type is not always callable or constructable. This rule only runs in TypeScript files and requires [type-aware linting](https://typescript-eslint.io/getting-started/typed-linting/). Without type information, it does nothing. ## Examples ```js // ❌ const getName = 'Sindre'; // βœ… const getName = () => 'Sindre'; ``` ```js // ❌ const createPizza = new Pizza(); // βœ… const createPizza = () => new Pizza(); ``` ```js // βœ… const getter = 'name'; const get_name = 'name'; const GET_NAME = 'name'; ``` ## Options Type: `object` ### verbs Type: `Array`\ Default: `['get', 'set', 'unset', 'delete', 'add', 'remove', 'destroy', 'create']` Function-style verb prefixes to check. Only camel-case names where the verb is followed by an uppercase letter are checked. ```js /* eslint unicorn/no-non-function-verb-prefix: ["error", {"verbs": ["build"]}] */ // ❌ const buildName = 'name'; // βœ… const buildName = () => 'name'; ``` ### ignore Type: `Array`\ Default: `[]` Names matching any of these patterns are not checked. Strings are treated as regular expressions, so they match anywhere in the name unless anchored with `^` and `$`. ```js 'unicorn/no-non-function-verb-prefix': [ 'error', { ignore: [ '^addOns$', ], }, ] ``` With the above config, this would pass: ```js const addOns = ['cheese', 'pineapple']; ``` And this would still fail: ```js const addPizza = new Pizza(); ```